diff --git a/src/main.rs b/src/main.rs index e2e2d2e..af044a8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,10 +59,10 @@ impl Env { } } fn fmt(&self) { - print!("{{"); let mut i = 0; let len = self.hashmap.len(); if len > 0 { + print!("{{"); for (key, val) in self.hashmap.iter() { print!("{:?} :", key); match val { @@ -273,15 +273,13 @@ fn fmt_tags(tagmask: u32) { let mut current: u32; while { current = 1 << tag; - current <= tagmask + current <= tagmask || tag < 32 } { tag += 1; if current != tagmask && (tagmask / current) % 2 != 0 { fmt_tags(tagmask - current); print!(", "); break; - } else if tag == 32 { - break; } } print!("\"{}\"", tag);