Skip to content

Commit

Permalink
show iteration count on success
Browse files Browse the repository at this point in the history
  • Loading branch information
hlorenzi committed Jun 24, 2021
1 parent 88cd22f commit 635c981
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/asm/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ pub struct AssemblyOutput
{
pub binary: util::BitVec,
pub state: State,
pub iterations: usize,
}


Expand Down Expand Up @@ -174,6 +175,7 @@ impl Assembler
{
state: self.state,
binary: full_output,
iterations: iteration,
});
}

Expand Down
10 changes: 8 additions & 2 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ fn drive_inner(
{
if !quiet
{
println!("success");
println!("success after {} iteration{}",
output.iterations,
if output.iterations == 1 { "" } else { "s" });
println!("");
}

Expand Down Expand Up @@ -271,7 +273,11 @@ fn drive_inner(
{ println!("no files written"); }

if !quiet
{ println!("success"); }
{
println!("success after {} iteration{}",
output.iterations,
if output.iterations == 1 { "" } else { "s" });
}
}

Ok(())
Expand Down

0 comments on commit 635c981

Please sign in to comment.