about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorLingMan <LingMan@users.noreply.github.com>2021-01-11 20:45:33 +0100
committerLingMan <LingMan@users.noreply.github.com>2021-01-14 19:23:59 +0100
commita56bffb4f9d6f7791b2fa40412bd3e0549d76cc3 (patch)
tree23875d16475aea0b37a608f0ca704a3016c1f0e4 /compiler/rustc_data_structures/src
parentd03fe84169d50a4b96cdef7b2f862217ab634055 (diff)
downloadrust-a56bffb4f9d6f7791b2fa40412bd3e0549d76cc3.tar.gz
rust-a56bffb4f9d6f7791b2fa40412bd3e0549d76cc3.zip
Use Option::map_or instead of `.map(..).unwrap_or(..)`
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/profiling.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs
index 5d13b7f27c7..b16d5a9e2b4 100644
--- a/compiler/rustc_data_structures/src/profiling.rs
+++ b/compiler/rustc_data_structures/src/profiling.rs
@@ -166,7 +166,7 @@ impl SelfProfilerRef {
         // If there is no SelfProfiler then the filter mask is set to NONE,
         // ensuring that nothing ever tries to actually access it.
         let event_filter_mask =
-            profiler.as_ref().map(|p| p.event_filter_mask).unwrap_or(EventFilter::empty());
+            profiler.as_ref().map_or(EventFilter::empty(), |p| p.event_filter_mask);
 
         SelfProfilerRef {
             profiler,