Enable more clippy lints (#7474)
This commit is contained in:
parent
608de4a264
commit
0fad7d8503
|
|
@ -233,12 +233,14 @@ needless_for_each = "warn"
|
||||||
needless_pass_by_ref_mut = "warn"
|
needless_pass_by_ref_mut = "warn"
|
||||||
needless_pass_by_value = "warn"
|
needless_pass_by_value = "warn"
|
||||||
negative_feature_names = "warn"
|
negative_feature_names = "warn"
|
||||||
|
non_std_lazy_statics = "warn"
|
||||||
non_zero_suggestions = "warn"
|
non_zero_suggestions = "warn"
|
||||||
nonstandard_macro_braces = "warn"
|
nonstandard_macro_braces = "warn"
|
||||||
option_as_ref_cloned = "warn"
|
option_as_ref_cloned = "warn"
|
||||||
option_option = "warn"
|
option_option = "warn"
|
||||||
path_buf_push_overwrite = "warn"
|
path_buf_push_overwrite = "warn"
|
||||||
pathbuf_init_then_push = "warn"
|
pathbuf_init_then_push = "warn"
|
||||||
|
precedence_bits = "warn"
|
||||||
print_stderr = "warn"
|
print_stderr = "warn"
|
||||||
print_stdout = "warn"
|
print_stdout = "warn"
|
||||||
ptr_as_ptr = "warn"
|
ptr_as_ptr = "warn"
|
||||||
|
|
@ -252,6 +254,7 @@ ref_as_ptr = "warn"
|
||||||
ref_option_ref = "warn"
|
ref_option_ref = "warn"
|
||||||
ref_patterns = "warn"
|
ref_patterns = "warn"
|
||||||
rest_pat_in_fully_bound_structs = "warn"
|
rest_pat_in_fully_bound_structs = "warn"
|
||||||
|
return_and_then = "warn"
|
||||||
same_functions_in_if_condition = "warn"
|
same_functions_in_if_condition = "warn"
|
||||||
semicolon_if_nothing_returned = "warn"
|
semicolon_if_nothing_returned = "warn"
|
||||||
set_contains_or_insert = "warn"
|
set_contains_or_insert = "warn"
|
||||||
|
|
@ -282,6 +285,7 @@ unnecessary_literal_bound = "warn"
|
||||||
unnecessary_safety_comment = "warn"
|
unnecessary_safety_comment = "warn"
|
||||||
unnecessary_safety_doc = "warn"
|
unnecessary_safety_doc = "warn"
|
||||||
unnecessary_self_imports = "warn"
|
unnecessary_self_imports = "warn"
|
||||||
|
unnecessary_semicolon = "warn"
|
||||||
unnecessary_struct_initialization = "warn"
|
unnecessary_struct_initialization = "warn"
|
||||||
unnecessary_wraps = "warn"
|
unnecessary_wraps = "warn"
|
||||||
unnested_or_patterns = "warn"
|
unnested_or_patterns = "warn"
|
||||||
|
|
@ -301,12 +305,8 @@ zero_sized_map_values = "warn"
|
||||||
# elidable_lifetime_names = "warn"
|
# elidable_lifetime_names = "warn"
|
||||||
# ignore_without_reason = "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.
|
# 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"
|
# single_option_map = "warn"
|
||||||
# unnecessary_debug_formatting = "warn"
|
# unnecessary_debug_formatting = "warn"
|
||||||
# unnecessary_semicolon = "warn"
|
|
||||||
|
|
||||||
|
|
||||||
# TODO(emilk): maybe enable more of these lints?
|
# TODO(emilk): maybe enable more of these lints?
|
||||||
|
|
|
||||||
|
|
@ -997,7 +997,7 @@ impl ResizeObserverContext {
|
||||||
// we rely on the resize observer to trigger the first `request_animation_frame`:
|
// we rely on the resize observer to trigger the first `request_animation_frame`:
|
||||||
if let Err(err) = runner_ref.request_animation_frame() {
|
if let Err(err) = runner_ref.request_animation_frame() {
|
||||||
log::error!("{}", super::string_from_js_value(&err));
|
log::error!("{}", super::string_from_js_value(&err));
|
||||||
};
|
}
|
||||||
} else {
|
} else {
|
||||||
log::warn!("ResizeObserverContext callback: failed to lock runner");
|
log::warn!("ResizeObserverContext callback: failed to lock runner");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ impl TextAgent {
|
||||||
|
|
||||||
if let Err(err) = self.input.focus() {
|
if let Err(err) = self.input.focus() {
|
||||||
log::error!("failed to set focus: {}", super::string_from_js_value(&err));
|
log::error!("failed to set focus: {}", super::string_from_js_value(&err));
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn blur(&self) {
|
pub fn blur(&self) {
|
||||||
|
|
@ -191,7 +191,7 @@ impl TextAgent {
|
||||||
|
|
||||||
if let Err(err) = self.input.blur() {
|
if let Err(err) = self.input.blur() {
|
||||||
log::error!("failed to set focus: {}", super::string_from_js_value(&err));
|
log::error!("failed to set focus: {}", super::string_from_js_value(&err));
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ impl WebPainter for WebPainterWgpu {
|
||||||
&mut encoder,
|
&mut encoder,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
Some((output_frame, capture_buffer))
|
Some((output_frame, capture_buffer))
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue