Use just `std::_` instead of `::std::_`

Accessing std this way has been stable since Rust 1.30.0
pull/215/head
Linus Färnstrand 5 years ago committed by Alexis Beingessner
parent 8413980b07
commit 9f131b5b9c

@ -18,7 +18,7 @@ impl<T> Deref for Vec<T> {
type Target = [T]; type Target = [T];
fn deref(&self) -> &[T] { fn deref(&self) -> &[T] {
unsafe { unsafe {
::std::slice::from_raw_parts(self.ptr.as_ptr(), self.len) std::slice::from_raw_parts(self.ptr.as_ptr(), self.len)
} }
} }
} }
@ -32,7 +32,7 @@ use std::ops::DerefMut;
impl<T> DerefMut for Vec<T> { impl<T> DerefMut for Vec<T> {
fn deref_mut(&mut self) -> &mut [T] { fn deref_mut(&mut self) -> &mut [T] {
unsafe { unsafe {
::std::slice::from_raw_parts_mut(self.ptr.as_ptr(), self.len) std::slice::from_raw_parts_mut(self.ptr.as_ptr(), self.len)
} }
} }
} }

@ -186,7 +186,7 @@ impl<T> Deref for Vec<T> {
type Target = [T]; type Target = [T];
fn deref(&self) -> &[T] { fn deref(&self) -> &[T] {
unsafe { unsafe {
::std::slice::from_raw_parts(self.ptr(), self.len) std::slice::from_raw_parts(self.ptr(), self.len)
} }
} }
} }
@ -194,7 +194,7 @@ impl<T> Deref for Vec<T> {
impl<T> DerefMut for Vec<T> { impl<T> DerefMut for Vec<T> {
fn deref_mut(&mut self) -> &mut [T] { fn deref_mut(&mut self) -> &mut [T] {
unsafe { unsafe {
::std::slice::from_raw_parts_mut(self.ptr(), self.len) std::slice::from_raw_parts_mut(self.ptr(), self.len)
} }
} }
} }

Loading…
Cancel
Save