Skip to content

Conversation

@rarensu
Copy link
Contributor

@rarensu rarensu commented Sep 13, 2025

Many small changes inspired by Clippy.

Previous PR in sequence was #393

Next PR in sequence was #399

Clippy says it's better to borrow with the `&` when possible: [https://rust-lang.github.io/rust-clippy/master/index.html#explicit_deref_methods]
It's what the reader would be expecting.
Clippy says it's better to use a semicolon to avoid giving the impression that something is being returned: [https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned]
Clippy says it's better to use methods directly, rather than construct closures that trivially wrap the methods: [https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls]
Clippy says it's better to call default methods of the struct, rather than the trait: [https://rust-lang.github.io/rust-clippy/master/index.html#default_trait_access]
Clippy says it's better to combine match arms that lead to the same outcome: [https://rust-lang.github.io/rust-clippy/master/index.html#match_same_arms]
Clippy says `from` is preferred to `as`, when available: [https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless]
Clippy says `map` and `unwrap_or` can be combined as `map_or`.
@cberner cberner merged commit b5cfb58 into cberner:master Sep 13, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants