Skip to content

Commit

Permalink
clear up example
Browse files Browse the repository at this point in the history
  • Loading branch information
dopsi committed Aug 19, 2019
1 parent 9b5e9aa commit 64432d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/fulladder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ fn main() {
y.replace(triple[1]);
c.replace(triple[2]);

let mut cycle_count = 0_u32;
while circuit.tick() && cycle_count < 10_u32 {
let mut cycle_count = 1;
while circuit.tick() && cycle_count < 11 {
cycle_count += 1;
}

Expand All @@ -123,8 +123,6 @@ fn main() {
// }
// ```

cycle_count += 1; // To get the correct number of cycles

println!(
"{} + {} + {} = {}{} (used {} cycles to reach a stable circuit)",
triple[0],
Expand Down

0 comments on commit 64432d1

Please sign in to comment.