From 176c0edfdb2b29fd493f3e2d66eadcd5c47665de Mon Sep 17 00:00:00 2001 From: Simon Ask Ulsnes Date: Fri, 2 Feb 2024 11:15:45 +0100 Subject: [PATCH] Remove unused PointerExt trait --- src/lib.rs | 18 ------------------ 1 file changed, 18 deletions(-) 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;