From 1580c0c5ba89a8b8e05aa68d16c462504b5fe893 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Wed, 24 Apr 2024 17:40:00 +0100 Subject: [PATCH] Ignore some Clippy lints This omits clippy::assigning_clones (false positive reported) --- .github/workflows/test.yml | 1 + crates/kas-core/src/core/widget_id.rs | 1 + crates/kas-core/src/layout/visitor.rs | 1 + crates/kas-view/src/filter/filter_list.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2bef24e1..9e72fa02b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -112,4 +112,5 @@ jobs: # -A clippy::comparison_chain \ # -A clippy::if_same_then_else \ # -A clippy::single-match \ + # -A clippy::redundant_pattern_matching \ # -A clippy::unit_arg diff --git a/crates/kas-core/src/core/widget_id.rs b/crates/kas-core/src/core/widget_id.rs index ab0429ca0..8f0288e17 100644 --- a/crates/kas-core/src/core/widget_id.rs +++ b/crates/kas-core/src/core/widget_id.rs @@ -236,6 +236,7 @@ impl<'a> Iterator for WidgetPathIter<'a> { /// [`Display`]: std::fmt::Display /// [`Action::RECONFIGURE`]: crate::Action::RECONFIGURE /// [`ConfigCx::configure`]: crate::event::ConfigCx::configure +#[allow(clippy::assigning_clones)] #[derive(Clone)] pub struct Id(IntOrPtr); diff --git a/crates/kas-core/src/layout/visitor.rs b/crates/kas-core/src/layout/visitor.rs index 2f5f2cbb8..078874575 100644 --- a/crates/kas-core/src/layout/visitor.rs +++ b/crates/kas-core/src/layout/visitor.rs @@ -58,6 +58,7 @@ pub trait Visitable { /// /// This is templated over `cell_info: C` where `C = ()` for lists or /// `C = GridCellInfo` for grids. +#[allow(clippy::len_without_is_empty)] #[cfg_attr(not(feature = "internal_doc"), doc(hidden))] #[cfg_attr(doc_cfg, doc(cfg(internal_doc)))] pub trait VisitableList { diff --git a/crates/kas-view/src/filter/filter_list.rs b/crates/kas-view/src/filter/filter_list.rs index c600a0b16..4565627c0 100644 --- a/crates/kas-view/src/filter/filter_list.rs +++ b/crates/kas-view/src/filter/filter_list.rs @@ -197,6 +197,7 @@ impl_scope! { } impl Self { + #[allow(clippy::missing_transmute_annotations)] // fields and fn parameters are annotated unsafe fn new<'a>(data: &'a A, view: &'a [A::Key]) -> Self { UnsafeFilteredList { data: std::mem::transmute(data),