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
|
@ -16,7 +16,7 @@ impl SearchHistory {
|
|||
}
|
||||
|
||||
if let Some(previously_searched) = self.history.last_mut() {
|
||||
if search_string.find(previously_searched.as_str()).is_some() {
|
||||
if search_string.contains(previously_searched.as_str()) {
|
||||
*previously_searched = search_string;
|
||||
self.selected = Some(self.history.len() - 1);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue