Re:Rust 1.100.0
by IshKebab on Thursday November 12, 2026 @05:06PM
(#50474996)
If you access the bool through a long path maybe.
[ Parent
| on HN ]
Re:Rust 1.100.0
by jacksontheel on Thursday November 12, 2026 @05:33PM
(#50475337)
Alright, I'm convinced, that makes a lot of sense.
You can of course also do
long_path_bool ^= true;
but that’s less obvious.That's the main reason for me as well
Re:Rust 1.100.0
by crabmusket on Thursday November 12, 2026 @08:59PM
(#50477118)
This gives me the same feeling as when I saw Rust's map Entry API
https://doc.rust-lang.org/std/collections/hash_map/enum.Entr...
let mut map: HashMap<&str, u32> = HashMap::new();
map.entry("poneyland").or_insert(3);
assert_eq!(map["poneyland"], 3);
It's very ergonomic.
Re:Rust 1.100.0
by voxelghost on Friday November 13, 2026 @02:50AM
(#50479827)
cant you just do
foo.bar().baz[expensive()].qux ^= true;Sure, but should you?
Re:Rust 1.100.0
by voxelghost on Sunday November 15, 2026 @11:52PM
(#50514174)
[delayed]