diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-05-15 00:40:14 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-05-15 00:42:52 -0400 |
| commit | fa45958ec8362c1157d8d655fc8ec95ba3f811d6 (patch) | |
| tree | d6ad9a005a9c06b0ac825e7d3a9ccc152fcc2195 | |
| parent | 2fc6b0998b3bd8c7ef796a9f4c795814b4ad30ea (diff) | |
| download | rust-fa45958ec8362c1157d8d655fc8ec95ba3f811d6.tar.gz rust-fa45958ec8362c1157d8d655fc8ec95ba3f811d6.zip | |
clone: clarify docstring
| -rw-r--r-- | src/libcore/clone.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index 9da970918b0..518ea46f10b 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -23,7 +23,8 @@ by convention implementing the `Clone` trait and calling the */ pub trait Clone { - /// Return a deep copy of the owned object tree. Managed boxes are cloned with a shallow copy. + /// Return a deep copy of the owned object tree. Types with shared ownership like managed boxes + /// are cloned with a shallow copy. fn clone(&self) -> Self; } @@ -33,7 +34,7 @@ impl Clone for () { fn clone(&self) -> () { () } } -impl<T:Clone> Clone for ~T { +impl<T: Clone> Clone for ~T { /// Return a deep copy of the owned box. #[inline(always)] fn clone(&self) -> ~T { ~(**self).clone() } |
