diff options
| author | bors <bors@rust-lang.org> | 2015-07-28 19:36:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-07-28 19:36:26 +0000 |
| commit | ba9224f35451e5d5ef7647bd2b40e5da80ce2735 (patch) | |
| tree | 3866a42e258bbf3a55cb9d683b64818a7b5a88e1 /src/libstd | |
| parent | aa6efd959e450e1cea177a3f6cd6bab6d80d4154 (diff) | |
| parent | e24423091f0690a83e63ee234bee5627a86b51f0 (diff) | |
| download | rust-ba9224f35451e5d5ef7647bd2b40e5da80ce2735.tar.gz rust-ba9224f35451e5d5ef7647bd2b40e5da80ce2735.zip | |
Auto merge of #26934 - reem:boxed-slice-clone, r=Gankro
Closes #25097
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ffi/c_str.rs | 10 |
1 files changed, 1 insertions, 9 deletions
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]>, @@ -251,13 +250,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; |
