Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Alan Lawrence <[email protected]>
  • Loading branch information
aborgna-q and acl-cqc committed Sep 16, 2023
1 parent 23737d7 commit 2925739
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/circuit/units.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ impl Units<DefaultUnitLabeller> {
/// node.
#[inline]
pub(super) fn new_circ_input(circuit: &impl Circuit) -> Self {
Self {
node: circuit.input(),
direction: Direction::Outgoing,
types: circuit.circuit_signature().input.clone(),
pos: 0,
linear_count: 0,
unit_labeller: DefaultUnitLabeller,
}
Self::new(
circuit,
circuit.input(),
Direction::Outgoing,
DefaultUnitLabeller,
)
}
}

Expand Down Expand Up @@ -159,9 +157,8 @@ where
if type_is_linear(typ) {
self.linear_count += 1;
}
let val = self.make_value(typ, port);
if val.is_some() {
return val;
if let Some(val) = self.make_value(typ, port) {
return Some(val);
}
}
}
Expand Down

0 comments on commit 2925739

Please sign in to comment.