Fixed doc example for Path::with_capacity
This commit is contained in:
parent
35d8c4400d
commit
c9fbcc1f39
1 changed files with 2 additions and 1 deletions
|
@ -1151,9 +1151,10 @@ impl PathBuf {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(path_buf_capacity)]
|
||||
/// use std::path::PathBuf;
|
||||
///
|
||||
/// let path = PathBuf::with_capacity(10);
|
||||
/// let mut path = PathBuf::with_capacity(10);
|
||||
/// let capacity = path.capacity();
|
||||
///
|
||||
/// // This push is done without reallocating
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue