Skip to content

Commit

Permalink
Apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
developedby committed Apr 4, 2024
1 parent 1675931 commit 3f9061b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/run/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ impl<'h, M: Mode> Net<'h, M> {
impl<'a, M: Mode> Net<'a, M> {
/// Reduces at most `limit` redexes.
///
/// If normalized, returns Some(num redexes).
/// If stopped because the limit was reached, returns None.
/// If normalized, returns `Some(num_redexes)`.
/// If stopped because the limit was reached, returns `None`.
#[inline(always)]
pub fn reduce(&mut self, limit: usize) -> Option<usize> {
assert!(!M::LAZY);
Expand Down
11 changes: 4 additions & 7 deletions src/transform/pre_reduce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,11 @@ impl Book {

let mut not_normal = vec![];
for (nam, state) in seen {
match state {
SeenState::Reduced { net, normal } => {
if !normal {
not_normal.push(nam.clone());
}
self.nets.insert(nam, net);
if let SeenState::Reduced { net, normal } = state {
if !normal {
not_normal.push(nam.clone());
}
_ => {}
self.nets.insert(nam, net);
}
}

Expand Down

0 comments on commit 3f9061b

Please sign in to comment.