Skip to content

Commit 69333f7

Browse files
committed
1 parent 485ee4f commit 69333f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/booleans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ fn simplify_not(cx: &LateContext<'_, '_>, expr: &Expr) -> Option<String> {
255255
.iter()
256256
.cloned()
257257
.flat_map(|(a, b)| vec![(a, b), (b, a)])
258-
.find(|&(a, _)| a == path.ident.name.as_str())
258+
.find(|&(a, _)| a == path.ident.name.as_str() as &str)
259259
.and_then(|(_, neg_method)| Some(format!("{}.{}()", snippet_opt(cx, args[0].span)?, neg_method)))
260260
},
261261
_ => None,

clippy_lints/src/functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ fn check_must_use_candidate<'a, 'tcx>(
465465
fn must_use_attr(attrs: &[Attribute]) -> Option<&Attribute> {
466466
attrs
467467
.iter()
468-
.find(|attr| attr.ident().map_or(false, |ident| "must_use" == &ident.as_str()))
468+
.find(|attr| attr.ident().map_or(false, |ident| "must_use" == &ident.as_str() as &str))
469469
}
470470

471471
fn returns_unit(decl: &hir::FnDecl) -> bool {

0 commit comments

Comments
 (0)