Skip to content

fix(rust): enforce lint on all files + fix lint issues - #1394

Merged
lovasoa merged 1 commit into
sqlpage:mainfrom
81reap:rust/lint
Aug 21, 2026
Merged

fix(rust): enforce lint on all files + fix lint issues#1394
lovasoa merged 1 commit into
sqlpage:mainfrom
81reap:rust/lint

Conversation

@81reap

@81reap 81reap commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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

Lint Sites Before After
unused_qualifications 81 outfile: &mut impl std::io::Write impl Write
unreachable_pub 42 pub fn inside a private module pub(crate) fn
elided_lifetimes_in_paths 24 args: &[PathAndJson] &[PathAndJson<'_>]
clippy::uninlined_format_args 7 format!("http://127.0.0.1:{}", port) format!("http://127.0.0.1:{port}")
clippy::format_push_string 5 msg.push_str(&format!("Actual: {}\n", actual)) writeln!(msg, "Actual: {actual}")

One or Two Offs

Lint Where Change
clippy::unused_async tests/oidc FakeOidcProvider::new is no longer async; 4 call sites drop .await
clippy::needless_pass_by_value tests/common build_echo_response(body: Vec<u8>)&[u8]
clippy::manual_assert ×2 build.rs, tests/sql_test_files if c { panic!(..) }assert!(!c, ..)
clippy::unnecessary_debug_formatting ×2 build.rs, src/main.rs {path:?}path.display()
clippy::items_after_statements build.rs take_between moved out of extract_icons_from_sprite to module scope
clippy::manual_let_else tests/sql_test_files match row.as_object() { Some(o) => o, None => continue }let Some(obj) = .. else { continue }
clippy::map_unwrap_or tests/oidc .map(f).unwrap_or_else(g).map_or_else(g, f)
clippy::redundant_closure tests/sql_test_files .map(|d| d.to_string()).map(ToString::to_string)
clippy::explicit_iter_loop ×2 tests/core, tests/oidc for x in v.into_iter()for x in v; .iter()&v
clippy::single_char_pattern tests/data_formats contains("{")contains('{')
clippy::unreadable_literal ×2 tests/requests, tests/uploads 123454123_454
clippy::semicolon_if_nothing_returned tests/requests ));
Duration unit readability tests/oidc Duration::from_secs(60)Duration::from_mins(1)
clippy::dbg_macro src/webserver/routing.rs deleted dbg!(&normalized_path, &self.contents) from the test file store

@lovasoa
lovasoa merged commit 6fb9a35 into sqlpage:main Aug 21, 2026
51 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