use .contains() or .any() instead of find(x).is_some() (clippy::search_is_some)
This commit is contained in:
parent
dbe3acfaeb
commit
0fa461558c
2 changed files with 2 additions and 2 deletions
|
@ -445,7 +445,7 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> {
|
|||
"highlight_if_we_cannot_match_hir_ty: type_name={:?} needle_fr={:?}",
|
||||
type_name, needle_fr
|
||||
);
|
||||
if type_name.find(&format!("'{}", counter)).is_some() {
|
||||
if type_name.contains(&format!("'{}", counter)) {
|
||||
// Only add a label if we can confirm that a region was labelled.
|
||||
RegionNameHighlight::CannotMatchHirTy(span, type_name)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue