Commit graph

7 commits

Author SHA1 Message Date
hrxi
3790aa3d5d Make bool_to_int_with_if a pedantic lint
In all the cases I've observed, it did not make the code clearer. Using
bools as integer is frowned upon in some languages, in others it's
simply not possible.

You can find comments on the original pull request #8131 that agree with
this point of view.
2022-11-10 19:42:20 +01:00
Alex Macleod
ad5dfcd123 Fix bool_to_int_with_if false positive with if let 2022-10-29 12:15:51 +00:00
kraktus
fa6850d888 [bool_to_int_with_if] do not lint in const context 2022-10-28 14:45:51 +02:00
Andre Bogus
eef5d477b5 use is_integer_literal more 2022-10-01 17:55:22 +02:00
Jacob Kiesel
4ffdce09b6 refactor: use clippy_utils::Sugg instead of direct string ops 2022-09-14 13:35:35 -06:00
Jacob Kiesel
1eb41804a2 bool_to_int_with_if inverse case patch 2022-09-14 13:33:13 -06:00
Dmitrii Lavrov
b1f86a49ea
New lint bool_to_int_with_if 2022-09-01 23:23:56 +02:00