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.)
This commit is contained in:
Nicholas Nethercote 2025-10-03 16:58:03 +10:00
parent cb0f969b62
commit 3a287e6034

View file

@ -875,11 +875,9 @@ impl<D: Deps> DepGraphData<D> {
parent_dep_node_index: SerializedDepNodeIndex,
frame: Option<&MarkFrame<'_>>,
) -> Option<()> {
let dep_dep_node_color = self.colors.get(parent_dep_node_index);
let get_dep_dep_node = || self.previous.index_to_node(parent_dep_node_index);
match dep_dep_node_color {
match self.colors.get(parent_dep_node_index) {
Some(DepNodeColor::Green(_)) => {
// This dependency has been marked as green before, we are
// still fine and can continue with checking the other
@ -929,9 +927,7 @@ impl<D: Deps> DepGraphData<D> {
return None;
}
let dep_dep_node_color = self.colors.get(parent_dep_node_index);
match dep_dep_node_color {
match self.colors.get(parent_dep_node_index) {
Some(DepNodeColor::Green(_)) => {
debug!("managed to FORCE dependency {dep_dep_node:?} to green");
return Some(());