diff --git a/Cargo.toml b/Cargo.toml index 65489aa6..9cb793d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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? diff --git a/crates/eframe/src/web/events.rs b/crates/eframe/src/web/events.rs index 73c3705a..1a79937b 100644 --- a/crates/eframe/src/web/events.rs +++ b/crates/eframe/src/web/events.rs @@ -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"); } diff --git a/crates/eframe/src/web/text_agent.rs b/crates/eframe/src/web/text_agent.rs index 42d6efdc..ac917329 100644 --- a/crates/eframe/src/web/text_agent.rs +++ b/crates/eframe/src/web/text_agent.rs @@ -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)); - }; + } } } diff --git a/crates/eframe/src/web/web_painter_wgpu.rs b/crates/eframe/src/web/web_painter_wgpu.rs index 735c94d7..7b83faa0 100644 --- a/crates/eframe/src/web/web_painter_wgpu.rs +++ b/crates/eframe/src/web/web_painter_wgpu.rs @@ -274,7 +274,7 @@ impl WebPainter for WebPainterWgpu { &mut encoder, )); } - }; + } Some((output_frame, capture_buffer)) };