about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2019-05-27 22:42:50 +0300
committerGitHub <noreply@github.com>2019-05-27 22:42:50 +0300
commitfe31ad38cb5c6fba5be871ab63082d7cdf430374 (patch)
tree82356f07b29598f6e4709244f698ae0721b9ef35 /src/liballoc
parent0653e78ae1b35eb50e06423052a34d807f1ac2af (diff)
downloadrust-fe31ad38cb5c6fba5be871ab63082d7cdf430374.tar.gz
rust-fe31ad38cb5c6fba5be871ab63082d7cdf430374.zip
Update src/liballoc/boxed.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 2f45ec7d643..76b660fba68 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -395,6 +395,7 @@ impl<T: Clone> Clone for Box<T> {
 #[stable(feature = "box_slice_clone", since = "1.3.0")]
 impl Clone for Box<str> {
     fn clone(&self) -> Self {
+        // this makes a copy of the data
         let buf: Box<[u8]> = self.as_bytes().into();
         unsafe {
             from_boxed_utf8_unchecked(buf)