diff --git a/src/lib.rs b/src/lib.rs index d1b55d9..86c3e25 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,24 +36,6 @@ extern crate alloc; -use core::mem::size_of; - -trait PointerExt: Sized { - fn c_offset_from(self, origin: Self) -> isize; -} - -impl PointerExt for *const T { - fn c_offset_from(self, origin: *const T) -> isize { - (self as isize - origin as isize) / size_of::() as isize - } -} - -impl PointerExt for *mut T { - fn c_offset_from(self, origin: *mut T) -> isize { - (self as isize - origin as isize) / size_of::() as isize - } -} - #[macro_use] mod macros;