Use .any(...) rather than .position(...).is_some().

This commit is contained in:
Dan Gohman
2017-11-08 10:40:42 -08:00
parent 8b053aa923
commit 388ebde41d

View File

@@ -979,9 +979,7 @@ impl<'a> Verifier<'a> {
);
}
let has_valid_encoding = encodings
.position(|possible_enc| encoding == possible_enc)
.is_some();
let has_valid_encoding = encodings.any(|possible_enc| encoding == possible_enc);
if !has_valid_encoding {
let mut possible_encodings = String::new();