From e24423091f0690a83e63ee234bee5627a86b51f0 Mon Sep 17 00:00:00 2001 From: Jonathan Reem Date: Sun, 26 Jul 2015 22:12:00 -0700 Subject: Implement Clone for Box<[T]> where T: Clone Closes #25097 --- src/libstd/ffi/c_str.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index c9fe6e7e0b1..6eb0719d9f6 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -11,7 +11,6 @@ use ascii; use borrow::{Cow, ToOwned, Borrow}; use boxed::Box; -use clone::Clone; use convert::{Into, From}; use cmp::{PartialEq, Eq, PartialOrd, Ord, Ordering}; use error::Error; @@ -62,7 +61,7 @@ use vec::Vec; /// } /// # } /// ``` -#[derive(PartialEq, PartialOrd, Eq, Ord, Hash)] +#[derive(PartialEq, PartialOrd, Eq, Ord, Hash, Clone)] #[stable(feature = "rust1", since = "1.0.0")] pub struct CString { inner: Box<[u8]>, @@ -250,13 +249,6 @@ impl CString { } } -#[stable(feature = "rust1", since = "1.0.0")] -impl Clone for CString { - fn clone(&self) -> Self { - CString { inner: self.inner.to_owned().into_boxed_slice() } - } -} - #[stable(feature = "rust1", since = "1.0.0")] impl Deref for CString { type Target = CStr; -- cgit 1.4.1-3-g733a5