Enable more clippy lints (#7474)

This commit is contained in:
Emil Ernerfeldt 2025-08-24 16:27:28 +02:00 committed by GitHub
parent 608de4a264
commit 0fad7d8503
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

View File

@ -233,12 +233,14 @@ needless_for_each = "warn"
needless_pass_by_ref_mut = "warn"
needless_pass_by_value = "warn"
negative_feature_names = "warn"
non_std_lazy_statics = "warn"
non_zero_suggestions = "warn"
nonstandard_macro_braces = "warn"
option_as_ref_cloned = "warn"
option_option = "warn"
path_buf_push_overwrite = "warn"
pathbuf_init_then_push = "warn"
precedence_bits = "warn"
print_stderr = "warn"
print_stdout = "warn"
ptr_as_ptr = "warn"
@ -252,6 +254,7 @@ ref_as_ptr = "warn"
ref_option_ref = "warn"
ref_patterns = "warn"
rest_pat_in_fully_bound_structs = "warn"
return_and_then = "warn"
same_functions_in_if_condition = "warn"
semicolon_if_nothing_returned = "warn"
set_contains_or_insert = "warn"
@ -282,6 +285,7 @@ unnecessary_literal_bound = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unnecessary_self_imports = "warn"
unnecessary_semicolon = "warn"
unnecessary_struct_initialization = "warn"
unnecessary_wraps = "warn"
unnested_or_patterns = "warn"
@ -301,12 +305,8 @@ zero_sized_map_values = "warn"
# elidable_lifetime_names = "warn"
# ignore_without_reason = "warn"
# manual_midpoint = "warn" # NOTE `midpoint` is often a lot slower for floats, so we have our own `emath::fast_midpoint` function.
# non_std_lazy_statics = "warn"
# precedence_bits = "warn"
# return_and_then = "warn"
# single_option_map = "warn"
# unnecessary_debug_formatting = "warn"
# unnecessary_semicolon = "warn"
# TODO(emilk): maybe enable more of these lints?

View File

@ -997,7 +997,7 @@ impl ResizeObserverContext {
// we rely on the resize observer to trigger the first `request_animation_frame`:
if let Err(err) = runner_ref.request_animation_frame() {
log::error!("{}", super::string_from_js_value(&err));
};
}
} else {
log::warn!("ResizeObserverContext callback: failed to lock runner");
}

View File

@ -179,7 +179,7 @@ impl TextAgent {
if let Err(err) = self.input.focus() {
log::error!("failed to set focus: {}", super::string_from_js_value(&err));
};
}
}
pub fn blur(&self) {
@ -191,7 +191,7 @@ impl TextAgent {
if let Err(err) = self.input.blur() {
log::error!("failed to set focus: {}", super::string_from_js_value(&err));
};
}
}
}

View File

@ -274,7 +274,7 @@ impl WebPainter for WebPainterWgpu {
&mut encoder,
));
}
};
}
Some((output_frame, capture_buffer))
};