mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-12 15:04:03 +00:00
Fixed doc example for Path::with_capacity
This commit is contained in:
parent
35d8c4400d
commit
c9fbcc1f39
@ -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…
Reference in New Issue
Block a user