From 510ffcbb18eb840236d6a0c81ce76652c6a5fefe Mon Sep 17 00:00:00 2001 From: Yuri6037 Date: Sun, 24 Oct 2021 20:41:21 +0200 Subject: [PATCH 1/2] Update src/geometry/scale_coordinates.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Crozet --- src/geometry/scale_coordinates.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/geometry/scale_coordinates.rs b/src/geometry/scale_coordinates.rs index 2f3fb5bc..73ad815f 100644 --- a/src/geometry/scale_coordinates.rs +++ b/src/geometry/scale_coordinates.rs @@ -18,7 +18,7 @@ macro_rules! deref_impl( #[inline] fn deref(&self) -> &Self::Target { - unsafe { &*(self as *const Scale as *const Self::Target) } + self.vector.deref() } } From 8efa9f76b7429aff3ce95f11905af31f52fb23b2 Mon Sep 17 00:00:00 2001 From: Yuri6037 Date: Sun, 24 Oct 2021 20:41:27 +0200 Subject: [PATCH 2/2] Update src/geometry/scale_coordinates.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Crozet --- src/geometry/scale_coordinates.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/geometry/scale_coordinates.rs b/src/geometry/scale_coordinates.rs index 73ad815f..5158c62d 100644 --- a/src/geometry/scale_coordinates.rs +++ b/src/geometry/scale_coordinates.rs @@ -25,7 +25,7 @@ macro_rules! deref_impl( impl DerefMut for Scale { #[inline] fn deref_mut(&mut self) -> &mut Self::Target { - unsafe { &mut *(self as *mut Scale as *mut Self::Target) } + self.vector.deref_mut() } } }