diff options
| author | Jonas Schievink <jonas@schievink.net> | 2016-04-04 14:10:03 +0200 |
|---|---|---|
| committer | Jonas Schievink <jonas@schievink.net> | 2016-04-04 14:10:03 +0200 |
| commit | 580c5f92d1050543f5e69f842ef8c4899ab2540e (patch) | |
| tree | 60ee2a5047e26a992a003e4bad52a59285a6a8d7 | |
| parent | da9c43a723a8bfe920483a550666f90de64830d5 (diff) | |
| download | rust-580c5f92d1050543f5e69f842ef8c4899ab2540e.tar.gz rust-580c5f92d1050543f5e69f842ef8c4899ab2540e.zip | |
use `unwrap_or`
| -rw-r--r-- | src/librustc_typeck/check/method/suggest.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/librustc_typeck/check/method/suggest.rs b/src/librustc_typeck/check/method/suggest.rs index 5b46880d5cf..fcd5c4ea94f 100644 --- a/src/librustc_typeck/check/method/suggest.rs +++ b/src/librustc_typeck/check/method/suggest.rs @@ -81,10 +81,7 @@ fn is_fn_ty<'a, 'tcx>(ty: &Ty<'tcx>, fcx: &FnCtxt<'a, 'tcx>, span: Span) -> bool }) }); - match opt_is_fn { - Some(result) => result, - None => false, - } + opt_is_fn.unwrap_or(false) } else { false } |
