summaryrefslogtreecommitdiff
path: root/src/rust
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-09 09:48:52 -0500
committerNick Mathewson <nickm@torproject.org>2017-11-09 09:48:52 -0500
commit039a77636730633e12410d42191f13dbdf5aea50 (patch)
tree75912892ec7d92040753ee29add09814b30040e4 /src/rust
parentc80bb04542b4a56f2c174b526006f6d3e402eecc (diff)
downloadtor-039a77636730633e12410d42191f13dbdf5aea50.tar.gz
tor-039a77636730633e12410d42191f13dbdf5aea50.zip
slight improvement to rust idiomicity
Diffstat (limited to 'src/rust')
-rw-r--r--src/rust/protover/protover.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/rust/protover/protover.rs b/src/rust/protover/protover.rs
index 85cdb3060a..b8bf280d4c 100644
--- a/src/rust/protover/protover.rs
+++ b/src/rust/protover/protover.rs
@@ -364,12 +364,7 @@ pub fn protover_string_supports_protocol_or_later(
None => return false,
};
- for v in supported_versions.iter() {
- if v >= &vers {
- return true;
- }
- }
- return false;
+ supported_versions.iter().any(|v| v >= &vers)
}
/// Fully expand a version range. For example, 1-3 expands to 1,2,3