summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJustin Worthe <justin@worthe-it.co.za>2018-12-05 22:09:10 +0200
committerJustin Worthe <justin@worthe-it.co.za>2018-12-05 22:09:10 +0200
commit8ceeb0bf7ace0527b03dd23b28bffa61d4d92bd8 (patch)
tree218437ed59d4069c45d1705974a08a079e1c8e4e /src/bin
parentfcaa7aed93f4a5a634a6673ba4784bd251a5151c (diff)
Added a convenient debug macro
Prints the expression along with it's value. Thanks to Steve Donovan for giving me the idea at the Rust meetup!
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/day_5.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/day_5.rs b/src/bin/day_5.rs
index d689e34..2b24d4c 100644
--- a/src/bin/day_5.rs
+++ b/src/bin/day_5.rs
@@ -17,7 +17,7 @@ fn main() -> Result<(), Box<Error>> {
polymer
};
- println!("Base length after reducing: {}", polymer.len());
+ debug!(polymer.len());
let mut min_length = polymer.len();
@@ -28,7 +28,7 @@ fn main() -> Result<(), Box<Error>> {
min_length = cmp::min(min_length, polymer_without_char.len());
}
- println!("Minimum length found: {}", min_length);
+ debug!(min_length);
Ok(())
}