Skip to content

Commit

Permalink
Eliminate else in type_certainty
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jul 13, 2023
1 parent d229d4a commit bc5369e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clippy_utils/src/ty/type_certainty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ fn type_certainty(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> Certainty {
// certainty using `Certainty::meet`. Thus, if the `TyKind::Path` were not treated specially here,
// the resulting certainty would be `Certainty::Certain(None)`.
if let TyKind::Path(qpath) = &ty.kind {
qpath_certainty(cx, qpath, true)
} else {
let mut visitor = CertaintyVisitor::new(cx);
visitor.visit_ty(ty);
visitor.certainty
return qpath_certainty(cx, qpath, true);
}

let mut visitor = CertaintyVisitor::new(cx);
visitor.visit_ty(ty);
visitor.certainty
}

fn generic_args_certainty(cx: &LateContext<'_>, args: &GenericArgs<'_>) -> Certainty {
Expand Down

0 comments on commit bc5369e

Please sign in to comment.