diff --git a/src/quaternion.rs b/src/quaternion.rs index 91f1688..2836c13 100644 --- a/src/quaternion.rs +++ b/src/quaternion.rs @@ -1,7 +1,7 @@ use cast::transmute; use cmp::Eq; use num::from_int; -use ptr::to_unsafe_ptr; +use ptr::{addr_of, to_unsafe_ptr}; use vec::raw::buf_as_slice; use std::cmp::FuzzyEq; @@ -306,6 +306,6 @@ pub impl Quat: FuzzyEq { pub impl Quat: ToPtr { #[inline(always)] pure fn to_ptr() -> *T { - to_unsafe_ptr(&self[0]) + addr_of(&self[0]) } } \ No newline at end of file diff --git a/src/vector.rs b/src/vector.rs index 926450a..95b3a86 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -1,7 +1,7 @@ use cast::transmute; use cmp::{Eq, Ord}; use vec::raw::buf_as_slice; -use ptr::to_unsafe_ptr; +use ptr::{addr_of, to_unsafe_ptr}; use std::cmp::FuzzyEq; use funs::exp::Exp; @@ -228,7 +228,7 @@ pub impl Vec2: FuzzyEq { pub impl Vec2: ToPtr { #[inline(always)] pure fn to_ptr() -> *T { - to_unsafe_ptr(&self[0]) + ptr::addr_of(&self[0]) } } @@ -416,7 +416,7 @@ pub impl Vec3: FuzzyEq { pub impl Vec3: ToPtr { #[inline(always)] pure fn to_ptr() -> *T { - to_unsafe_ptr(&self[0]) + addr_of(&self[0]) } } @@ -610,6 +610,6 @@ pub impl Vec4: FuzzyEq { pub impl Vec4: ToPtr { #[inline(always)] pure fn to_ptr() -> *T { - to_unsafe_ptr(&self[0]) + addr_of(&self[0]) } } \ No newline at end of file