From fe3ad0a204656b43ecec7605161603d2943b0582 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 8 Jun 2013 15:02:32 -0400 Subject: rm some uses of to_mut_unsafe_ptr --- src/libstd/vec.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/vec.rs') diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index 6137b589bdb..7c52ccc967e 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -1315,8 +1315,8 @@ pub fn swap(v: &mut [T], a: uint, b: uint) { unsafe { // Can't take two mutable loans from one vector, so instead just cast // them to their raw pointers to do the swap - let pa: *mut T = ptr::to_mut_unsafe_ptr(&mut v[a]); - let pb: *mut T = ptr::to_mut_unsafe_ptr(&mut v[b]); + let pa: *mut T = &mut v[a]; + let pb: *mut T = &mut v[b]; ptr::swap_ptr(pa, pb); } } -- cgit 1.4.1-3-g733a5