Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Oct 13, 2024
1 parent ad9a149 commit d261064
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/borrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
use core::sync::atomic::{AtomicUsize, Ordering};

/// A bit mask used to signal the `AtomicBorrow` has an active mutable borrow.
const UNIQUE_BIT: usize = !(usize::max_value() >> 1);
const UNIQUE_BIT: usize = !(usize::MAX >> 1);

const COUNTER_MASK: usize = usize::max_value() >> 1;
const COUNTER_MASK: usize = usize::MAX >> 1;

/// An atomic integer used to dynamicaly enforce borrowing rules
///
Expand Down
1 change: 1 addition & 0 deletions src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ macro_rules! tuple_impl {
}
}

#[allow(clippy::zero_repeat_side_effects)]
unsafe impl<$($name: Component),*> Bundle for ($($name,)*) {
fn with_static_ids<T>(f: impl FnOnce(&[TypeId]) -> T) -> T {
const N: usize = count!($($name),*);
Expand Down
4 changes: 2 additions & 2 deletions src/entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ impl Entities {
{
return Ok(Location {
archetype: 0,
index: u32::max_value(),
index: u32::MAX,
});
} else {
return Err(NoSuchEntity);
Expand Down Expand Up @@ -545,7 +545,7 @@ impl EntityMeta {
},
location: Location {
archetype: 0,
index: u32::max_value(), // dummy value, to be filled in
index: u32::MAX, // dummy value, to be filled in
},
};
}
Expand Down

0 comments on commit d261064

Please sign in to comment.