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_query_system/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_query_system/src')
| -rw-r--r-- | compiler/rustc_query_system/src/dep_graph/graph.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_query_system/src/dep_graph/graph.rs b/compiler/rustc_query_system/src/dep_graph/graph.rs index 605d7ae4af6..151e056a5b3 100644 --- a/compiler/rustc_query_system/src/dep_graph/graph.rs +++ b/compiler/rustc_query_system/src/dep_graph/graph.rs @@ -953,7 +953,7 @@ impl<K: DepKind> DepGraph<K> { // Returns true if the given node has been marked as green during the // current compilation session. Used in various assertions pub fn is_green(&self, dep_node: &DepNode<K>) -> bool { - self.node_color(dep_node).map(|c| c.is_green()).unwrap_or(false) + self.node_color(dep_node).map_or(false, |c| c.is_green()) } // This method loads all on-disk cacheable query results into memory, so |
