mirror of
https://github.com/Noratrieb/stuff.git
synced 2026-01-14 08:30:11 +01:00
relax S: StuffingStrategy<B> bound on type
This commit is contained in:
parent
c54e5531aa
commit
f0fae6c7cf
1 changed files with 2 additions and 3 deletions
|
|
@ -124,7 +124,6 @@ pub use crate::{backend::Backend, strategy::StuffingStrategy};
|
|||
#[repr(transparent)]
|
||||
pub struct StuffedPtr<T, S, B = usize>(B::Stored, PhantomData<S>)
|
||||
where
|
||||
S: StuffingStrategy<B>,
|
||||
B: Backend<T>;
|
||||
|
||||
impl<T, S, B> StuffedPtr<T, S, B>
|
||||
|
|
@ -165,8 +164,8 @@ where
|
|||
/// # Safety
|
||||
/// `StuffedPtr` must contain pointer data and not `other` data
|
||||
pub unsafe fn get_ptr_unchecked(&self) -> *mut T {
|
||||
let (provenance, addr) = B::get_ptr(self.0);
|
||||
let addr = S::extract_ptr(addr);
|
||||
let (provenance, stored) = B::get_ptr(self.0);
|
||||
let addr = S::extract_ptr(stored);
|
||||
Strict::with_addr(provenance, addr)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue