[egui] Enable a bunch of clippy warnings
This commit is contained in:
parent
8de74e4250
commit
aec97c74b9
5 changed files with 19 additions and 3 deletions
|
@ -160,6 +160,7 @@ impl Prepared {
|
|||
)
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_pass_by_value)] // intentional to swallow up `content_ui`.
|
||||
pub(crate) fn end(self, ctx: &Arc<Context>, content_ui: Ui) -> Response {
|
||||
let Prepared {
|
||||
layer_id,
|
||||
|
|
|
@ -295,7 +295,7 @@ impl<'open> Window<'open> {
|
|||
title_bar.ui(
|
||||
&mut area_content_ui,
|
||||
outer_rect,
|
||||
content_response,
|
||||
&content_response,
|
||||
open,
|
||||
&mut collapsing,
|
||||
collapsible,
|
||||
|
@ -659,7 +659,7 @@ impl TitleBar {
|
|||
mut self,
|
||||
ui: &mut Ui,
|
||||
outer_rect: Rect,
|
||||
content_response: Option<Response>,
|
||||
content_response: &Option<Response>,
|
||||
open: Option<&mut bool>,
|
||||
collapsing: &mut collapsing_header::State,
|
||||
collapsible: bool,
|
||||
|
|
|
@ -38,20 +38,34 @@
|
|||
#![cfg_attr(not(debug_assertions), deny(warnings))] // Forbid warnings in release builds
|
||||
#![warn(
|
||||
clippy::all,
|
||||
clippy::await_holding_lock,
|
||||
clippy::dbg_macro,
|
||||
clippy::doc_markdown,
|
||||
clippy::empty_enum,
|
||||
clippy::enum_glob_use,
|
||||
clippy::exit,
|
||||
clippy::filter_map_next,
|
||||
clippy::fn_params_excessive_bools,
|
||||
clippy::if_let_mutex,
|
||||
clippy::imprecise_flops,
|
||||
clippy::inefficient_to_string,
|
||||
clippy::linkedlist,
|
||||
clippy::lossy_float_literal,
|
||||
clippy::macro_use_imports,
|
||||
clippy::match_on_vec_items,
|
||||
clippy::match_wildcard_for_single_variants,
|
||||
clippy::mem_forget,
|
||||
clippy::mismatched_target_os,
|
||||
clippy::needless_borrow,
|
||||
clippy::needless_continue,
|
||||
clippy::needless_pass_by_value,
|
||||
clippy::option_option,
|
||||
clippy::pub_enum_variant_names,
|
||||
clippy::rest_pat_in_fully_bound_structs,
|
||||
clippy::todo,
|
||||
clippy::unimplemented,
|
||||
clippy::unnested_or_patterns,
|
||||
clippy::verbose_file_reads,
|
||||
future_incompatible,
|
||||
nonstandard_style,
|
||||
rust_2018_idioms
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![allow(clippy::needless_pass_by_value)] // False positives with `impl ToString`
|
||||
|
||||
use std::ops::RangeInclusive;
|
||||
|
||||
use crate::{paint::*, *};
|
||||
|
|
|
@ -51,7 +51,6 @@ impl egui::app::App for ExampleApp {
|
|||
if let Ok(result) = receiver.try_recv() {
|
||||
self.in_progress = None;
|
||||
self.result = Some(result.map(Resource::from_response));
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue