Skip to content

Commit 7148412

Browse files
authored
Vec slice example fix style and show type elision
1 parent 1dc748f commit 7148412

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ use crate::raw_vec::RawVec;
171171
///
172172
/// // ... and that's all!
173173
/// // you can also do it like this:
174-
/// let x : &[usize] = &v;
174+
/// let u: &[usize] = &v; // or &[_]
175175
/// ```
176176
///
177177
/// In Rust, it's more common to pass slices as arguments rather than vectors

0 commit comments

Comments
 (0)