fix(rust): enforce lint on all files + fix lint issues - #1394
Merged
Conversation
lovasoa
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses most of the issues in #1389 by enabling linting on all files. Remaining issues can be fixed with mutants.rs (out of scope for this change).
Repeated PAtterns
unused_qualificationsoutfile: &mut impl std::io::Writeimpl Writeunreachable_pubpub fninside a private modulepub(crate) fnelided_lifetimes_in_pathsargs: &[PathAndJson]&[PathAndJson<'_>]clippy::uninlined_format_argsformat!("http://127.0.0.1:{}", port)format!("http://127.0.0.1:{port}")clippy::format_push_stringmsg.push_str(&format!("Actual: {}\n", actual))writeln!(msg, "Actual: {actual}")One or Two Offs
clippy::unused_asynctests/oidcFakeOidcProvider::newis no longerasync; 4 call sites drop.awaitclippy::needless_pass_by_valuetests/commonbuild_echo_response(body: Vec<u8>)→&[u8]clippy::manual_assert×2build.rs,tests/sql_test_filesif c { panic!(..) }→assert!(!c, ..)clippy::unnecessary_debug_formatting×2build.rs,src/main.rs{path:?}→path.display()clippy::items_after_statementsbuild.rstake_betweenmoved out ofextract_icons_from_spriteto module scopeclippy::manual_let_elsetests/sql_test_filesmatch row.as_object() { Some(o) => o, None => continue }→let Some(obj) = .. else { continue }clippy::map_unwrap_ortests/oidc.map(f).unwrap_or_else(g)→.map_or_else(g, f)clippy::redundant_closuretests/sql_test_files.map(|d| d.to_string())→.map(ToString::to_string)clippy::explicit_iter_loop×2tests/core,tests/oidcfor x in v.into_iter()→for x in v;.iter()→&vclippy::single_char_patterntests/data_formatscontains("{")→contains('{')clippy::unreadable_literal×2tests/requests,tests/uploads123454→123_454clippy::semicolon_if_nothing_returnedtests/requests)→);tests/oidcDuration::from_secs(60)→Duration::from_mins(1)clippy::dbg_macrosrc/webserver/routing.rsdbg!(&normalized_path, &self.contents)from the test file store