4 ms·
"(iota is not used but still incremented)" Seems bizarre. That's actually a pretty confusing idiom in that context.
by bpicolo 10y ago
"(iota is not used but still incremented)"
Seems bizarre. That's actually a pretty confusing idiom in that context.
- spoiler 10y agoWhile it is a bit odd, it is documented (and I've seen it used a few times in code).
- Ericson2314 10y agoYeah this is classic shitty design from Go. One-off compiler hack that doesn't actually address any of the actual safety problems. org/bitflags/bitflags/macro.bitflags!.html is much better.
- desdiv 10y agohttps://doc.rust-lang.org/bitflags/bitflags/macro.bitflags!.html https://doc.rust-lang.org/bitflags/bitflags/macro.bitflags!.... To save you guys two clicks.
- Ericson2314 10y agoThanks. Phone clipboard failure on my part.