Skip to content

Commit

Permalink
drive by fix for some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jun 19, 2024
1 parent 2abdd3f commit 7c36154
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct Id {
}

impl Id {
pub const MAX_U32: u32 = std::u32::MAX - 0xFF;
pub const MAX_U32: u32 = u32::MAX - 0xFF;
pub const MAX_USIZE: usize = Self::MAX_U32 as usize;

/// Create a `salsa::Id` from a u32 value. This value should
Expand Down
2 changes: 1 addition & 1 deletion src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct IngredientIndex(u32);
impl IngredientIndex {
/// Create an ingredient index from a usize.
pub(crate) fn from(v: usize) -> Self {
assert!(v < (std::u32::MAX as usize));
assert!(v < (u32::MAX as usize));
Self(v as u32)
}

Expand Down
2 changes: 2 additions & 0 deletions src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ pub mod helper {
///
/// Impl will fulfill the postconditions of `maybe_update`
pub unsafe trait Fallback<T> {
/// # Safety
///
/// Same safety conditions as `Update::maybe_update`
unsafe fn maybe_update(old_pointer: *mut T, new_value: T) -> bool;
}
Expand Down

0 comments on commit 7c36154

Please sign in to comment.