Skip to content

Commit fe31ad3

Browse files
matkladRalfJung
andauthored
Update src/liballoc/boxed.rs
Co-Authored-By: Ralf Jung <[email protected]>
1 parent 0653e78 commit fe31ad3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/liballoc/boxed.rs

+1
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ impl<T: Clone> Clone for Box<T> {
395395
#[stable(feature = "box_slice_clone", since = "1.3.0")]
396396
impl Clone for Box<str> {
397397
fn clone(&self) -> Self {
398+
// this makes a copy of the data
398399
let buf: Box<[u8]> = self.as_bytes().into();
399400
unsafe {
400401
from_boxed_utf8_unchecked(buf)

0 commit comments

Comments
 (0)