Skip to content

Commit 52cebb1

Browse files
committed
Auto merge of #4673 - Manishearth:rustup, r=phansch
Rustup to rustc 1.40.0-nightly (237d54f 2019-10-15) changelog: none
2 parents ddb5cb7 + 608d09c commit 52cebb1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

clippy_lints/src/booleans.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,10 @@ 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, _)| {
259+
let path: &str = &path.ident.name.as_str();
260+
a == path
261+
})
259262
.and_then(|(_, neg_method)| Some(format!("{}.{}()", snippet_opt(cx, args[0].span)?, neg_method)))
260263
},
261264
_ => None,

clippy_lints/src/functions.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,12 @@ fn check_must_use_candidate<'a, 'tcx>(
462462
}
463463

464464
fn must_use_attr(attrs: &[Attribute]) -> Option<&Attribute> {
465-
attrs
466-
.iter()
467-
.find(|attr| attr.ident().map_or(false, |ident| "must_use" == &ident.as_str()))
465+
attrs.iter().find(|attr| {
466+
attr.ident().map_or(false, |ident| {
467+
let ident: &str = &ident.as_str();
468+
"must_use" == ident
469+
})
470+
})
468471
}
469472

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

0 commit comments

Comments
 (0)