mirror of
https://github.com/salsa-rs/salsa.git
synced 2024-10-23 20:59:51 +00:00
drive by fix for some clippy warnings
This commit is contained in:
parent
2abdd3f2d5
commit
7c36154b36
3 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue