Skip to content

Commit 3a287e6

Browse files
committed
Remove some unnecessary locals.
They both have a single use. (They can't be united, though, because `self.colors` might change between the two `get` calls.)
1 parent cb0f969 commit 3a287e6

File tree

1 file changed

+2
-6
lines changed
  • compiler/rustc_query_system/src/dep_graph

1 file changed

+2
-6
lines changed

compiler/rustc_query_system/src/dep_graph/graph.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -875,11 +875,9 @@ impl<D: Deps> DepGraphData<D> {
875875
parent_dep_node_index: SerializedDepNodeIndex,
876876
frame: Option<&MarkFrame<'_>>,
877877
) -> Option<()> {
878-
let dep_dep_node_color = self.colors.get(parent_dep_node_index);
879-
880878
let get_dep_dep_node = || self.previous.index_to_node(parent_dep_node_index);
881879

882-
match dep_dep_node_color {
880+
match self.colors.get(parent_dep_node_index) {
883881
Some(DepNodeColor::Green(_)) => {
884882
// This dependency has been marked as green before, we are
885883
// still fine and can continue with checking the other
@@ -929,9 +927,7 @@ impl<D: Deps> DepGraphData<D> {
929927
return None;
930928
}
931929

932-
let dep_dep_node_color = self.colors.get(parent_dep_node_index);
933-
934-
match dep_dep_node_color {
930+
match self.colors.get(parent_dep_node_index) {
935931
Some(DepNodeColor::Green(_)) => {
936932
debug!("managed to FORCE dependency {dep_dep_node:?} to green");
937933
return Some(());

0 commit comments

Comments
 (0)