diff options
| author | LingMan <LingMan@users.noreply.github.com> | 2021-01-11 20:45:33 +0100 |
|---|---|---|
| committer | LingMan <LingMan@users.noreply.github.com> | 2021-01-14 19:23:59 +0100 |
| commit | a56bffb4f9d6f7791b2fa40412bd3e0549d76cc3 (patch) | |
| tree | 23875d16475aea0b37a608f0ca704a3016c1f0e4 /compiler/rustc_data_structures/src | |
| parent | d03fe84169d50a4b96cdef7b2f862217ab634055 (diff) | |
| download | rust-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.rs | 2 |
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, |
