We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
else
type_certainty
1 parent 3f96362 commit e01a8dfCopy full SHA for e01a8df
clippy_utils/src/ty/type_certainty/mod.rs
@@ -135,12 +135,12 @@ fn type_certainty(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> Certainty {
135
// certainty using `Certainty::meet`. Thus, if the `TyKind::Path` were not treated specially here,
136
// the resulting certainty would be `Certainty::Certain(None)`.
137
if let TyKind::Path(qpath) = &ty.kind {
138
- qpath_certainty(cx, qpath, true)
139
- } else {
140
- let mut visitor = CertaintyVisitor::new(cx);
141
- visitor.visit_ty(ty);
142
- visitor.certainty
+ return qpath_certainty(cx, qpath, true);
143
}
+
+ let mut visitor = CertaintyVisitor::new(cx);
+ visitor.visit_ty(ty);
+ visitor.certainty
144
145
146
fn generic_args_certainty(cx: &LateContext<'_>, args: &GenericArgs<'_>) -> Certainty {
0 commit comments