diff options
| author | Alan Wu <XrXr@users.noreply.github.com> | 2022-07-21 13:15:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-21 13:15:29 -0400 |
| commit | 321419ec42dcff403a54cd1153fefdecf50161da (patch) | |
| tree | 29c532700bbd079464c8398938995356bd79407d /library/alloc/src | |
| parent | 1673f1450eeaf4a5452e086db0fe2ae274a0144f (diff) | |
| download | rust-321419ec42dcff403a54cd1153fefdecf50161da.tar.gz rust-321419ec42dcff403a54cd1153fefdecf50161da.zip | |
Box::from(slice): Clarify that contents are copied
A colleague mentioned that they interpreted the old text as saying that only the pointer and the length are copied. Add a clause so it is more clear that the pointed to contents are also copied.
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/boxed.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index c1ceeb0deb8..d2dca6cab03 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -1480,7 +1480,7 @@ impl<T: Copy> From<&[T]> for Box<[T]> { /// Converts a `&[T]` into a `Box<[T]>` /// /// This conversion allocates on the heap - /// and performs a copy of `slice`. + /// and performs a copy of `slice` and its contents. /// /// # Examples /// ```rust |
