File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
clippy_utils/src/ty/type_certainty Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -135,12 +135,12 @@ fn type_certainty(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> Certainty {
135
135
// certainty using `Certainty::meet`. Thus, if the `TyKind::Path` were not treated specially here,
136
136
// the resulting certainty would be `Certainty::Certain(None)`.
137
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
138
+ return qpath_certainty ( cx, qpath, true ) ;
143
139
}
140
+
141
+ let mut visitor = CertaintyVisitor :: new ( cx) ;
142
+ visitor. visit_ty ( ty) ;
143
+ visitor. certainty
144
144
}
145
145
146
146
fn generic_args_certainty ( cx : & LateContext < ' _ > , args : & GenericArgs < ' _ > ) -> Certainty {
You can’t perform that action at this time.
0 commit comments