Fix error in example by adding type annotation
This commit is contained in:
parent
6e099a6986
commit
5e2bfda19a
1 changed files with 1 additions and 1 deletions
|
|
@ -479,7 +479,7 @@ impl<'a, T: Copy> From<&'a [T]> for Box<[T]> {
|
|||
/// ```rust
|
||||
/// // create a &[u8] which will be used to create a Box<[u8]>
|
||||
/// let slice: &[u8] = &[104, 101, 108, 108, 111];
|
||||
/// let boxed_slice = Box::from(slice);
|
||||
/// let boxed_slice: Box<[u8]> = Box::from(slice);
|
||||
///
|
||||
/// println!("{:?}", boxed_slice);
|
||||
/// ```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue