3 ms·
Ack, yeah. I forgot about those despite having used them. That's a good point and I stand corrected. Edited post above.
by mmastrac 2y ago
Ack, yeah. I forgot about those despite having used them. That's a good point and I stand corrected. Edited post above.
- deathanatos 2y agoI guess it depends on whether the sentence is only qualified as "integer" types, but bool is sort of the same way, no? A bool must be either 0 or 1 (false or true), or it's UB. (And I think for much the same reason, the niche optimization. Option<bool> is 1 B.) (And for the non-Rustaceans, the only way to get a bool to be not false or true, i.e., not 0 or 1, would be unsafe {} code. Or put differently, not having a bool be "2" is an invariant unsafe code must not violate. (IIRC, at all times, even in unsafe code.))