Skip to content

Commit 635c981

Browse files
committed
show iteration count on success
1 parent 88cd22f commit 635c981

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/asm/state.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub struct AssemblyOutput
6363
{
6464
pub binary: util::BitVec,
6565
pub state: State,
66+
pub iterations: usize,
6667
}
6768

6869

@@ -174,6 +175,7 @@ impl Assembler
174175
{
175176
state: self.state,
176177
binary: full_output,
178+
iterations: iteration,
177179
});
178180
}
179181

src/driver.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ fn drive_inner(
233233
{
234234
if !quiet
235235
{
236-
println!("success");
236+
println!("success after {} iteration{}",
237+
output.iterations,
238+
if output.iterations == 1 { "" } else { "s" });
237239
println!("");
238240
}
239241

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

273275
if !quiet
274-
{ println!("success"); }
276+
{
277+
println!("success after {} iteration{}",
278+
output.iterations,
279+
if output.iterations == 1 { "" } else { "s" });
280+
}
275281
}
276282

277283
Ok(())

0 commit comments

Comments
 (0)