3 ms·
Note that the Rust docs explicitly discourage using `then_some` in the manner described in this video. https://doc.rust-lang.org/beta/std/primitive.bool.html#m
by SeanAnderson 3y ago
Note that the Rust docs explicitly discourage using `then_some` in the manner described in this video.
https://doc.rust-lang.org/beta/std/primitive.bool.html#method.then_some https://doc.rust-lang.org/beta/std/primitive.bool.html#metho...
> Arguments passed to then_some are eagerly evaluated; if you are passing the result of a function call, it is recommended to use then, which is lazily evaluated.