Format clippy_lints/src/let_underscore.rs

This commit is contained in:
Philipp Krones 2020-04-07 22:19:20 +02:00 committed by GitHub
parent 2ad4d6a057
commit f5b6a0c54d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LetUnderscore {
then {
let init_ty = cx.tables.expr_ty(init);
let contains_sync_guard = init_ty.walk().any(|inner| match inner.unpack() {
GenericArgKind::Type(inner_ty) => SYNC_GUARD_PATHS.iter().any(|path| match_type(cx, inner_ty, path)),
GenericArgKind::Type(inner_ty) => {
SYNC_GUARD_PATHS.iter().any(|path| match_type(cx, inner_ty, path))
},
GenericArgKind::Lifetime(_) | GenericArgKind::Const(_) => false,
});