News for hackers. Stuff that matters.
Re:Rust 1.100.0 by saghm on Thursday November 12, 2026 @09:36PM (#50477387)
If you're dealing with something like an `Option<bool>` or `Vec<bool>`, it might be nice to avoid needing to do a more verbose dereference and assign:

    let mut vec = vec![false, false, false, false];
    vec[2].toggle();
    *vec[2] = !vec[2];
"Good enough" is subjective, but I personally prefer the new way

There are no comments on this comment yet.