chore: resolve clippy warnings for pre-push audit

This commit is contained in:
Riz Ashraf committed 2026-10-09 01:06:30 +01:00
1 parent bd20482cea
commit 03f8786d24
7 files changed
+27 -31

No files matched your search

+1 -2
View File
@@ -1,7 +1,6 @@
use image::DynamicImage;
#[test]
fn test_img() {
let mut img = image::DynamicImage::new_rgb8(10, 10);
img.invert();
let img2 = img.adjust_contrast(20.0);
let _img2 = img.adjust_contrast(20.0);
}
+7 -4
View File
@@ -101,9 +101,10 @@ fn test_dashboard_route_parity() {
let mut registered_routes = HashSet::new();
for part in setup_content.split(".route(") {
let trimmed = part.trim_start();
if trimmed.starts_with('"') {
if let Some(end_quote) = trimmed[1..].find('"') {
let route = &trimmed[1..=end_quote];
#[allow(clippy::collapsible_if)]
if let Some(stripped) = trimmed.strip_prefix('"') {
if let Some(end_quote) = stripped.find('"') {
let route = &stripped[..end_quote];
registered_routes.insert(route.to_string());
}
}
@@ -119,8 +120,10 @@ fn test_dashboard_route_parity() {
let rest = &dashboard_content[start..];
let quote_char = dashboard_content[..start].chars().last();
let mut endpoint = String::new();
#[allow(clippy::collapsible_if)]
if let Some(q) = quote_char {
if q == '`' || q == '"' || q == '\'' {
let is_quote = q == '`' || q == '"' || q == '\'';
if is_quote {
if let Some(close_idx) = rest.find(q) {
let full_call = &rest[..close_idx];
let clean = if let Some(q_idx) = full_call.find('?') {