From 6228de3850abc61ac3ecf04ab7d9bb414af1ea7c Mon Sep 17 00:00:00 2001 From: 53hornet Date: Thu, 5 Aug 2021 11:48:14 -0400 Subject: simpler index increment --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index fb030d0..13f15d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,8 @@ fn main() -> Result<(), Box> { > 0 } { // write index - print!("{:010}: ", idx); + print!("{:010}: ", idx * CHUNK_SIZE); + idx += 1; // write hex for byte in &chunk { @@ -30,7 +31,6 @@ fn main() -> Result<(), Box> { // write ascii println!("{}", String::from_utf8_lossy(&chunk).replace('\n', "⏎")); - idx += CHUNK_SIZE; chunk.clear(); } -- cgit v1.2.3