From 9f131b5b9cce7e39c21fc4fa1cc0c0c208cc81d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Fri, 17 Apr 2020 00:08:09 +0200 Subject: [PATCH] Use just `std::_` instead of `::std::_` Accessing std this way has been stable since Rust 1.30.0 --- src/vec-deref.md | 4 ++-- src/vec-final.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vec-deref.md b/src/vec-deref.md index 1000909..68d64f7 100644 --- a/src/vec-deref.md +++ b/src/vec-deref.md @@ -18,7 +18,7 @@ impl Deref for Vec { type Target = [T]; fn deref(&self) -> &[T] { 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 DerefMut for Vec { fn deref_mut(&mut self) -> &mut [T] { 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) } } } diff --git a/src/vec-final.md b/src/vec-final.md index 0c3f042..9d0a802 100644 --- a/src/vec-final.md +++ b/src/vec-final.md @@ -186,7 +186,7 @@ impl Deref for Vec { type Target = [T]; fn deref(&self) -> &[T] { unsafe { - ::std::slice::from_raw_parts(self.ptr(), self.len) + std::slice::from_raw_parts(self.ptr(), self.len) } } } @@ -194,7 +194,7 @@ impl Deref for Vec { impl DerefMut for Vec { fn deref_mut(&mut self) -> &mut [T] { unsafe { - ::std::slice::from_raw_parts_mut(self.ptr(), self.len) + std::slice::from_raw_parts_mut(self.ptr(), self.len) } } }