10 Commits

Author SHA1 Message Date
Philipp Krones
62a82b361c
Format let-chains across the code base
In the updated nightly version, it seems that rustfmt now supports formatting
let-chains. Since we're using them a lot, it's a lot of reformatting.
2023-11-02 17:24:30 +01:00
Alex Macleod
7347c1803f Set existing doc-tests to no_run 2023-10-23 15:28:26 +00:00
Alex Macleod
2811effe34 Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
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