chore: fix clippy lints from nightly-2025-03-16 (#11273)

I like to run nightly clippy every so often to make our future rust
upgrades easier. Some notable changes:

* Prefer `next_back()` over `last()`. Generic iterators will implement
`last()` to run forward through the iterator until the end.

* Prefer `io::Error::other()`.

* Use implicit returns

One case where I haven't dealt with the issues is the now
[more-sensitive "large enum variant"
lint](https://github.com/rust-lang/rust-clippy/pull/13833). I chose not
to take any decisions around it here, and simply marked them as allow
for now.
This commit is contained in:
Conrad Ludgate
2025-04-09 16:04:42 +01:00
committed by GitHub
parent d11f23a341
commit 72832b3214
25 changed files with 57 additions and 67 deletions

View File

@@ -47,6 +47,7 @@ impl ConnInfo {
}
#[derive(Clone)]
#[allow(clippy::large_enum_variant, reason = "TODO")]
pub(crate) enum ClientDataEnum {
Remote(ClientDataRemote),
Local(ClientDataLocal),