Bad suggestion of useless_let_if_seq
when having side effects.
#4124
Labels
L-suggestion
Lint: Improving, adding or fixing lint suggestions
The version of clippy is
0.0.212
.Here's an example:
It suggest writing
let <mut> ret = if cond() { .. foo2() .. } else { foo1() };
, which cause 3 function calls (may have side-effects) being reordered, andfoo1()
not always being called.Well, I'm not sure how to write make it more idiomatic in this case...
The text was updated successfully, but these errors were encountered: