chore: resolve clippy warnings for pre-push audit
This commit is contained in:
1 parent
bd20482cea
commit
03f8786d24
7 files changed
+27
-31
No files matched your search
@@ -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);
|
||||
}
|
||||
@@ -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('?') {
|
||||
|
||||
Reference in new issue
Block a user