diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2019-05-27 22:42:50 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-27 22:42:50 +0300 |
| commit | fe31ad38cb5c6fba5be871ab63082d7cdf430374 (patch) | |
| tree | 82356f07b29598f6e4709244f698ae0721b9ef35 /src/liballoc | |
| parent | 0653e78ae1b35eb50e06423052a34d807f1ac2af (diff) | |
| download | rust-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.rs | 1 |
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) |
