4 ms·
In fact, that's exactly what Rust already does today! Option<char> uses the exact same amount of bits to store as plain char, because the compiler has enough in
by dmit 7y ago
In fact, that's exactly what Rust already does today! Option<char> uses the exact same amount of bits to store as plain char, because the compiler has enough information to encode the Option-ness of char in what it knows is a garbage bit of the underlying type.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=56fdd3cb74b645d729d9e49fb7250921 https://play.rust-lang.org/?version=stable&mode=debug&editio...