diff options
author | Alan Du <[email protected]> | 2019-06-04 08:07:23 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2019-06-04 23:05:07 +0100 |
commit | 9b54b06ee3867cf632434b9cbb06d64d0d739cff (patch) | |
tree | bab81cfad0a60a7b75ba7e307bcddb2fb3763806 /crates/ra_hir | |
parent | 964edd99433e965aa24f2237d1530ce1c575fa8e (diff) |
Fix clippy::option_map_or_none
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/nameres.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index 7bddee9b9..c59c30579 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs | |||
@@ -406,7 +406,7 @@ impl CrateDefMap { | |||
406 | }; | 406 | }; |
407 | 407 | ||
408 | for (i, segment) in segments { | 408 | for (i, segment) in segments { |
409 | let curr = match curr_per_ns.as_ref().left().map_or(None, |m| m.as_ref().take_types()) { | 409 | let curr = match curr_per_ns.as_ref().left().and_then(|m| m.as_ref().take_types()) { |
410 | Some(r) => r, | 410 | Some(r) => r, |
411 | None => { | 411 | None => { |
412 | // we still have path segments left, but the path so far | 412 | // we still have path segments left, but the path so far |