1
0
Fork 0

Suppress unused_unit more locally

This commit is contained in:
Robbert van der Helm 2022-07-01 14:58:31 +02:00
parent 29e9d620ca
commit 1d7cbe4c4d
2 changed files with 3 additions and 4 deletions

View file

@ -11,6 +11,9 @@ macro_rules! check_null_ptr {
/// The same as [`check_null_ptr!`], but with a custom message. /// The same as [`check_null_ptr!`], but with a custom message.
macro_rules! check_null_ptr_msg { macro_rules! check_null_ptr_msg {
($msg:expr, $ret:expr, $ptr:expr $(, $ptrs:expr)* $(, )?) => { ($msg:expr, $ret:expr, $ptr:expr $(, $ptrs:expr)* $(, )?) => {
// Clippy doesn't understand it when we use a unit in our `check_null_ptr!()` maccro, even
// if we explicitly pattern match on that unit
#[allow(clippy::unused_unit)]
if $ptr.is_null() $(|| $ptrs.is_null())* { if $ptr.is_null() $(|| $ptrs.is_null())* {
nih_debug_assert_failure!($msg); nih_debug_assert_failure!($msg);
return $ret; return $ret;

View file

@ -1,7 +1,3 @@
// Clippy doesn't understand it when we use a unit in our `check_null_ptr!()` maccro, even if we
// explicitly pattern match on that unit
#![allow(clippy::unused_unit)]
use atomic_float::AtomicF32; use atomic_float::AtomicF32;
use atomic_refcell::{AtomicRefCell, AtomicRefMut}; use atomic_refcell::{AtomicRefCell, AtomicRefMut};
use clap_sys::events::{ use clap_sys::events::{