Skip to content

Commit

Permalink
Fixed doc example for Path::with_capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronstillwell committed Feb 18, 2019
1 parent 35d8c44 commit c9fbcc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libstd/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9fbcc1

Please sign in to comment.