We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0653e78 commit fe31ad3Copy full SHA for fe31ad3
src/liballoc/boxed.rs
@@ -395,6 +395,7 @@ impl<T: Clone> Clone for Box<T> {
395
#[stable(feature = "box_slice_clone", since = "1.3.0")]
396
impl Clone for Box<str> {
397
fn clone(&self) -> Self {
398
+ // this makes a copy of the data
399
let buf: Box<[u8]> = self.as_bytes().into();
400
unsafe {
401
from_boxed_utf8_unchecked(buf)
0 commit comments