From 9b54b06ee3867cf632434b9cbb06d64d0d739cff Mon Sep 17 00:00:00 2001 From: Alan Du Date: Tue, 4 Jun 2019 03:07:23 -0400 Subject: Fix clippy::option_map_or_none --- crates/ra_hir/src/nameres.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir/src') 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 { }; for (i, segment) in segments { - let curr = match curr_per_ns.as_ref().left().map_or(None, |m| m.as_ref().take_types()) { + let curr = match curr_per_ns.as_ref().left().and_then(|m| m.as_ref().take_types()) { Some(r) => r, None => { // we still have path segments left, but the path so far -- cgit v1.2.3