fix fmt_tags
This commit is contained in:
parent
2c499eda61
commit
b5c48b4898
21
src/main.rs
21
src/main.rs
@ -287,18 +287,15 @@ fn configuration() -> Flags {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn fmt_tags(tagmask: u32) {
|
fn fmt_tags(tagmask: u32) {
|
||||||
let mut tag = 0;
|
let mut first = true;
|
||||||
let mut current: u32;
|
for i in 0..32 {
|
||||||
while {
|
if tagmask >> i & 1 == 1 {
|
||||||
current = 1 << tag;
|
if !first {
|
||||||
tag == 32 || current <= tagmask
|
print!(", \"{}\"", i + 1);
|
||||||
} {
|
} else {
|
||||||
tag += 1;
|
print!("\"{}\"", i + 1);
|
||||||
if current != tagmask && (tagmask / current) % 2 != 0 {
|
first = false;
|
||||||
fmt_tags(tagmask - current);
|
}
|
||||||
print!(", ");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print!("\"{}\"", tag);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user