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.
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.
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.
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.
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.
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.
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.
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.
Raphaël Gomès <rgomes@octobus.net> [Fri, 06 Jan 2023 18:52:04 +0100] rev 49913
rust: use `logging_timer` instead of `micro_timer`
I am the author of `micro_timer`.
I built it at the time because I couldn't find a crate that was simple to use
and flexible to do function timing with. Turns out I just couldn't find it
because crates.io's search isn't all that great, or maybe I didn't look hard
enough.
`logging_timer` is better in every way:
- supports changing the logging level
- supports start and end logging
- supports intermediary messages
- supports inline macros
- supports formatting the output
- better IDE/tree-sitter integration thanks to a more robust proc macro
I also changed all uses to one-liners, so it's easier to copy-paste.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 12 Jan 2023 16:15:51 +0000] rev 49912
pathauditor: make _checkfs_exists a static method
This fixes the bug detected by pytype where the auditor
used in vfs.py may be a no-op auditor (vfs.py, line 398),
which doesn't have the _checkfs_exists method.