2 ms·
In Rust you can just use the method call `expr.not()`
by pitaj 3y ago
In Rust you can just use the method call `expr.not()`
- pzmarzly 3y agoWhile it's true that in Rust most operators (eg. all arithmetic operators, as well as !, &, |, ^) are just syntax sugar over some trait methods that you could call directly, this is not the case for boolean "and" and "or": && and || have to be special due to their short-circuiting properties (in "false && b()" b never gets called, same in "true || b()").