From 64432d175bc739f94cf53a6b27722adf39982141 Mon Sep 17 00:00:00 2001 From: Simon Doppler Date: Mon, 19 Aug 2019 16:45:38 +0200 Subject: [PATCH] clear up example --- examples/fulladder.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/fulladder.rs b/examples/fulladder.rs index 51ea16e..c31b741 100644 --- a/examples/fulladder.rs +++ b/examples/fulladder.rs @@ -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; } @@ -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],