Skip to content

Commit

Permalink
run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
BramOtte committed Dec 14, 2023
1 parent 4e5ba17 commit 56a75a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/core/src/redpiler/backend/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ impl Node {
let mut default_input_count = 0;
let mut side_input_count = 0;

let mut default_inputs = NodeInput {ss_counts: [0; 16]};
let mut side_inputs = NodeInput {ss_counts: [0; 16]};
let mut default_inputs = NodeInput { ss_counts: [0; 16] };
let mut side_inputs = NodeInput { ss_counts: [0; 16] };
for edge in graph.edges_directed(node_idx, Direction::Incoming) {
let weight = edge.weight();
let distance = weight.ss;
Expand Down Expand Up @@ -393,7 +393,7 @@ impl DirectBackend {
} else {
&mut update_ref.default_inputs
};

let old_power = old_power.saturating_sub(distance);
let new_power = new_power.saturating_sub(distance);

Expand All @@ -403,7 +403,7 @@ impl DirectBackend {

// Safety: signal strength is never larger than 15
unsafe {
*inputs.ss_counts.get_unchecked_mut(old_power as usize) -= 1;
*inputs.ss_counts.get_unchecked_mut(old_power as usize) -= 1;
*inputs.ss_counts.get_unchecked_mut(new_power as usize) += 1;
}

Expand Down

0 comments on commit 56a75a0

Please sign in to comment.