]> git.lizzy.rs Git - rust.git/commitdiff
Just use Some(()) instead
authorJonas Schievink <jonas@schievink.net>
Mon, 4 Apr 2016 13:08:38 +0000 (15:08 +0200)
committerJonas Schievink <jonas@schievink.net>
Mon, 4 Apr 2016 13:08:38 +0000 (15:08 +0200)
src/librustc_typeck/check/method/suggest.rs

index fcd5c4ea94fde2ce0ce262f3f9fb9cc2a1267925..32b5a63817ea5e7cd586df4e9d07256b6e988e30 100644 (file)
@@ -74,14 +74,14 @@ fn is_fn_ty<'a, 'tcx>(ty: &Ty<'tcx>, fcx: &FnCtxt<'a, 'tcx>, span: Span) -> bool
                         let mut selcx = SelectionContext::new(infcx);
 
                         if selcx.evaluate_obligation(&obligation) {
-                            Some(true)
+                            Some(())
                         } else {
                             None
                         }
                     })
                 });
 
-                opt_is_fn.unwrap_or(false)
+                opt_is_fn.is_some()
             } else {
                 false
             }