diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-18 08:33:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-18 08:33:13 -0400 |
commit | 52191064acbddabf979c5f3b3f0813c105ce82f3 (patch) | |
tree | 57715466d83725c1f965a270205fb7e39756f983 /src/rust/protover/protover.rs | |
parent | 4199c8b2d0d53b7c906943e5f844aafa57b9047d (diff) | |
parent | 2ddbaf9cdc3c850a56ef1f3bf6977c903e24bb39 (diff) | |
download | tor-52191064acbddabf979c5f3b3f0813c105ce82f3.tar.gz tor-52191064acbddabf979c5f3b3f0813c105ce82f3.zip |
Merge branch 'maint-0.3.4'
Diffstat (limited to 'src/rust/protover/protover.rs')
-rw-r--r-- | src/rust/protover/protover.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rust/protover/protover.rs b/src/rust/protover/protover.rs index 8417d85959..43822a3f15 100644 --- a/src/rust/protover/protover.rs +++ b/src/rust/protover/protover.rs @@ -378,7 +378,6 @@ impl UnvalidatedProtoEntry { let maybe_supported_versions: Option<&ProtoSet> = supported.get(&supported_protocol); let supported_versions: &ProtoSet; - let mut unsupported_versions: ProtoSet; // If the protocol wasn't in the map, then we don't know about it // and don't support any of its versions. Add its versions to the @@ -391,8 +390,7 @@ impl UnvalidatedProtoEntry { } else { supported_versions = maybe_supported_versions.unwrap(); } - unsupported_versions = versions.clone(); - unsupported_versions.retain(|x| !supported_versions.contains(x)); + let unsupported_versions = versions.and_not_in(supported_versions); if !unsupported_versions.is_empty() { unsupported.insert(protocol.clone(), unsupported_versions); |