From 161860c7dc22c98831cd9fb8ea445e6b886d937e Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Thu, 22 Nov 2012 10:38:39 +1000 Subject: [PATCH] Update deprecated addr_of calls to the newer to_unsafe_ptr --- src/quat.rs | 4 ++-- src/vec.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/quat.rs b/src/quat.rs index da6d7f0..5c23b6d 100644 --- a/src/quat.rs +++ b/src/quat.rs @@ -1,6 +1,6 @@ use core::cast::transmute; use core::cmp::Eq; -use core::ptr::{addr_of, to_unsafe_ptr}; +use core::ptr::to_unsafe_ptr; use core::vec::raw::buf_as_slice; use std::cmp::FuzzyEq; @@ -91,7 +91,7 @@ pub impl Quat: Quaternion *T { - addr_of(&self[0]) + to_unsafe_ptr(&self[0]) } #[inline(always)] diff --git a/src/vec.rs b/src/vec.rs index a702e5d..97475a6 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -1,6 +1,6 @@ use core::cast::transmute; use core::cmp::Eq; -use core::ptr::{addr_of, to_unsafe_ptr}; +use core::ptr::to_unsafe_ptr; use core::vec::raw::buf_as_slice; use std::cmp::FuzzyEq; @@ -118,7 +118,7 @@ pub impl Vec2: Vector { #[inline(always)] pure fn to_ptr() -> *T { - ptr::addr_of(&self[0]) + ptr::to_unsafe_ptr(&self[0]) } } @@ -269,7 +269,7 @@ pub impl Vec3: Vector { #[inline(always)] pure fn to_ptr() -> *T { - addr_of(&self[0]) + to_unsafe_ptr(&self[0]) } } @@ -438,7 +438,7 @@ pub impl Vec4: Vector { #[inline(always)] pure fn to_ptr() -> *T { - addr_of(&self[0]) + to_unsafe_ptr(&self[0]) } }