From 4b6566c7d9518d9bd879c3cc9782c4b0544278c9 Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Wed, 28 Feb 2024 21:06:20 +0200 Subject: [PATCH] Fix feature = "cargo-clippy" deprecation --- qmetaobject/src/lib.rs | 6 +++--- qmetaobject/src/scenegraph.rs | 2 +- qmetaobject_impl/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qmetaobject/src/lib.rs b/qmetaobject/src/lib.rs index 3f462f93..9906ad52 100644 --- a/qmetaobject/src/lib.rs +++ b/qmetaobject/src/lib.rs @@ -151,8 +151,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #![recursion_limit = "10240"] -#![cfg_attr(feature = "cargo-clippy", allow(clippy::needless_pass_by_value))] // Too many of that for qt types. (FIXME) -#![cfg_attr(feature = "cargo-clippy", allow(clippy::cognitive_complexity))] +#![allow(clippy::needless_pass_by_value)] // Too many of that for qt types. (FIXME) +#![allow(clippy::cognitive_complexity)] #[doc(hidden)] pub use qmetaobject_impl::{qrc_internal, SimpleListItem}; @@ -511,7 +511,7 @@ impl<'pin, T: QObject + ?Sized + 'pin> QObjectPinned<'pin, T> { /// Borrow the object // FIXME: there are too many cases for which we want reentrance after borrowing //pub fn borrow(&self) -> std::cell::Ref { self.0.borrow() } - #[cfg_attr(feature = "cargo-clippy", allow(clippy::should_implement_trait))] + #[allow(clippy::should_implement_trait)] pub fn borrow(&self) -> &T { unsafe { &*self.0.as_ptr() } } diff --git a/qmetaobject/src/scenegraph.rs b/qmetaobject/src/scenegraph.rs index a405c424..3b157b22 100644 --- a/qmetaobject/src/scenegraph.rs +++ b/qmetaobject/src/scenegraph.rs @@ -74,7 +74,7 @@ cpp! {{ /// for [`SGNode::update_static`]. /// /// Do not reimplement -#[cfg_attr(feature = "cargo-clippy", allow(clippy::len_without_is_empty))] +#[allow(clippy::len_without_is_empty)] pub trait UpdateNodeFnTuple { fn len(&self) -> u64; unsafe fn update_fn(&self, i: u64, _: *mut c_void) -> *mut c_void; diff --git a/qmetaobject_impl/src/lib.rs b/qmetaobject_impl/src/lib.rs index 36fc87a6..1c991205 100644 --- a/qmetaobject_impl/src/lib.rs +++ b/qmetaobject_impl/src/lib.rs @@ -19,8 +19,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. //! This crates implement the custom derive used by the `qmetaobject` crate. #![recursion_limit = "256"] -#![cfg_attr(feature = "cargo-clippy", allow(clippy::unreadable_literal))] // Because we copy-paste constants from Qt -#![cfg_attr(feature = "cargo-clippy", allow(clippy::cognitive_complexity))] +#![allow(clippy::unreadable_literal)] // Because we copy-paste constants from Qt +#![allow(clippy::cognitive_complexity)] use proc_macro::TokenStream; use quote::{quote, ToTokens};