Skip to content

Commit 0dd8b27

Browse files
committed
Fix formatting
1 parent ba05b76 commit 0dd8b27

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

clippy_utils/src/ty.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,17 +1332,13 @@ pub fn deref_chain<'cx, 'tcx>(cx: &'cx LateContext<'tcx>, ty: Ty<'tcx>) -> impl
13321332
/// If you need this, you should wrap this call in `clippy_utils::ty::deref_chain().any(...)`.
13331333
pub fn get_adt_inherent_method<'a>(cx: &'a LateContext<'_>, ty: Ty<'_>, method_name: Symbol) -> Option<&'a AssocItem> {
13341334
if let Some(ty_did) = ty.ty_adt_def().map(AdtDef::did) {
1335-
cx.tcx
1336-
.inherent_impls(ty_did)
1337-
.into_iter()
1338-
.flatten()
1339-
.find_map(|&did| {
1340-
cx.tcx
1341-
.associated_items(did)
1342-
.filter_by_name_unhygienic(method_name)
1343-
.next()
1344-
.filter(|item| item.kind == AssocKind::Fn)
1345-
})
1335+
cx.tcx.inherent_impls(ty_did).into_iter().flatten().find_map(|&did| {
1336+
cx.tcx
1337+
.associated_items(did)
1338+
.filter_by_name_unhygienic(method_name)
1339+
.next()
1340+
.filter(|item| item.kind == AssocKind::Fn)
1341+
})
13461342
} else {
13471343
None
13481344
}

0 commit comments

Comments
 (0)