Mon, 09 Jan 2023 18:27:53 +0100 rust-clippy: add `is_empty` method to please the `clippy` gods
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:27:53 +0100] rev 49923
rust-clippy: add `is_empty` method to please the `clippy` gods I can see it being useful anyway.
Mon, 09 Jan 2023 18:25:24 +0100 rust: don't use a reference to a `Cow`
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:25:24 +0100] rev 49922
rust: don't use a reference to a `Cow` This was caught by `clippy`.
Mon, 09 Jan 2023 18:22:46 +0100 rust-clippy: reassure `clippy` that 8 arguments is expected
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:22:46 +0100] rev 49921
rust-clippy: reassure `clippy` that 8 arguments is expected This API is a bit verbose, but refactoring it into a struct isn't better in this particular case IMO, and there is a lot of info to pass.
Mon, 09 Jan 2023 18:15:29 +0100 rust-clippy: use `write_all` since we're not expecting a partial write
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:15:29 +0100] rev 49920
rust-clippy: use `write_all` since we're not expecting a partial write Clippy caught this. This is a good lint in general, but here this was not really a bug in this example code.
Mon, 09 Jan 2023 18:09:26 +0100 rust-clippy: tell clippy we want to keep those clauses separate
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:09:26 +0100] rev 49919
rust-clippy: tell clippy we want to keep those clauses separate This makes the cases more explicit, which is wanted in this specific instance.
Mon, 09 Jan 2023 18:04:29 +0100 rust-clippy: tell clippy we care about keeping those `if` clauses separate
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:04:29 +0100] rev 49918
rust-clippy: tell clippy we care about keeping those `if` clauses separate Thses were written this way because it spells out the logic in a more explicit manner.
Mon, 09 Jan 2023 18:03:24 +0100 rust-clippy: factor an `if` with the same duplicated clause
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:03:24 +0100] rev 49917
rust-clippy: factor an `if` with the same duplicated clause Unlike the next changeset, this if is not really made clearer by keeping the cases separate.
Mon, 09 Jan 2023 18:00:56 +0100 rust: fix broken debug assertions
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 18:00:56 +0100] rev 49916
rust: fix broken debug assertions These were caught by `clippy`. It appears no one uses the debug builds, which is how this wasn't caught before.
Mon, 09 Jan 2023 17:48:54 +0100 rust-narrow: fix loop that never loops
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 17:48:54 +0100] rev 49915
rust-narrow: fix loop that never loops This was caught by `clippy`. I guess the narrow tests leave something to be desired, since this previously only checked the first valid pattern.
Mon, 09 Jan 2023 17:40:03 +0100 rust: run `cargo clippy`
Raphaël Gomès <rgomes@octobus.net> [Mon, 09 Jan 2023 17:40:03 +0100] rev 49914
rust: run `cargo clippy` These automatic fixes are good to have because they make the code more idiomatic and less surprising. The transform from `sort` -> `sort_unstable` is questionable, but this is only in a test, so it doesn't matter in our case.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip