From f0fae6c7cf9918f0ea808350a8dac83e5f38e79c Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sun, 10 Apr 2022 15:19:07 +0200 Subject: [PATCH] relax `S: StuffingStrategy` bound on type --- src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4f35c92..c374373 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -124,7 +124,6 @@ pub use crate::{backend::Backend, strategy::StuffingStrategy}; #[repr(transparent)] pub struct StuffedPtr(B::Stored, PhantomData) where - S: StuffingStrategy, B: Backend; impl StuffedPtr @@ -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) }