Clippy fixes

This commit is contained in:
mdecimus
2024-12-01 20:13:06 +13:00
parent 4f02e4c96f
commit 03d9dabed3
27 changed files with 115 additions and 119 deletions

View File

@@ -79,7 +79,7 @@ mod tests {
use super::*;
const TEST_SIZE: usize = 1000;
type TestBitset = AtomicBitset<{ (TEST_SIZE + USIZE_BITS - 1) / USIZE_BITS }>;
type TestBitset = AtomicBitset<{ TEST_SIZE.div_ceil(USIZE_BITS) }>;
static BITSET: TestBitset = TestBitset::new();
#[test]

View File

@@ -21,8 +21,7 @@ use parking_lot::Mutex;
use crate::*;
pub(crate) type GlobalInterests =
AtomicBitset<{ (TOTAL_EVENT_COUNT + USIZE_BITS - 1) / USIZE_BITS }>;
pub(crate) type GlobalInterests = AtomicBitset<{ TOTAL_EVENT_COUNT.div_ceil(USIZE_BITS) }>;
pub(crate) static TRACE_INTERESTS: GlobalInterests = GlobalInterests::new();
pub(crate) type CollectorThread = JoinHandle<()>;

View File

@@ -19,7 +19,7 @@ use super::{
const MAX_BATCH_SIZE: usize = 32768;
pub type Interests = Box<Bitset<{ (TOTAL_EVENT_COUNT + USIZE_BITS - 1) / USIZE_BITS }>>;
pub type Interests = Box<Bitset<{ TOTAL_EVENT_COUNT.div_ceil(USIZE_BITS) }>>;
pub type EventBatch = Vec<Arc<Event<EventDetails>>>;
#[derive(Debug)]

View File

@@ -127,7 +127,7 @@ impl<T: AsRef<Event<EventDetails>>> Serialize for JsonEventSerializer<T> {
}
}
impl<'x> Serialize for JsonEventSerializer<Keys<'x>> {
impl Serialize for JsonEventSerializer<Keys<'_>> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,