Skip to content

Commit

Permalink
Fix feature = "cargo-clippy" deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 authored and ogoffart committed Feb 29, 2024
1 parent 728220c commit 4b6566c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions qmetaobject/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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<T> { 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() }
}
Expand Down
2 changes: 1 addition & 1 deletion qmetaobject/src/scenegraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ cpp! {{
/// for [`SGNode<ContainerNode>::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<T> {
fn len(&self) -> u64;
unsafe fn update_fn(&self, i: u64, _: *mut c_void) -> *mut c_void;
Expand Down
4 changes: 2 additions & 2 deletions qmetaobject_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 4b6566c

Please sign in to comment.