News for hackers. Stuff that matters.
Re:Rust 1.100.0 by brabel on Friday November 13, 2026 @02:44AM (#50479763)
My first thought was that this is useful when you need a lambda that does this, now you can use ::toggle
Re:Rust 1.100.0 by masklinn on Friday November 13, 2026 @05:25AM (#50481307)
Now I just need the integer types to gain in-place inc() and dec()

I don’t know how to feel about toggle returning neither old nor new value tho.

Re:Rust 1.100.0 by SkiFire13 on Friday November 13, 2026 @07:30AM (#50482584)
You could do `bool::not` before, but this is clearer and doesn't require imports.
Re:Rust 1.100.0 by CUViper on Friday November 13, 2026 @01:58PM (#50488096)
`bool::not` returns the value, while `bool::toggle` is more like a `not_assign`.