Enable clippy::search_is_some
(#8748)
This PR enables the [`clippy::search_is_some`](https://rust-lang.github.io/rust-clippy/master/index.html#/search_is_some) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
3ab16d8012
commit
328c8a94b3
5 changed files with 7 additions and 9 deletions
|
@ -357,8 +357,8 @@ mod tests {
|
|||
.collect::<Vec<_>>();
|
||||
|
||||
assert_eq!(result.len(), 2);
|
||||
assert!(result.iter().find(|(k, _)| k == &&"baa").is_some());
|
||||
assert!(result.iter().find(|(k, _)| k == &&"baaab").is_some());
|
||||
assert!(result.iter().any(|(k, _)| k == &&"baa"));
|
||||
assert!(result.iter().any(|(k, _)| k == &&"baaab"));
|
||||
|
||||
let result = map
|
||||
.iter_from(&"c")
|
||||
|
@ -366,7 +366,7 @@ mod tests {
|
|||
.collect::<Vec<_>>();
|
||||
|
||||
assert_eq!(result.len(), 1);
|
||||
assert!(result.iter().find(|(k, _)| k == &&"c").is_some());
|
||||
assert!(result.iter().any(|(k, _)| k == &&"c"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue