Skip to content

Commit c9fbcc1

Browse files
Fixed doc example for Path::with_capacity
1 parent 35d8c44 commit c9fbcc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libstd/path.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1151,9 +1151,10 @@ impl PathBuf {
11511151
/// # Examples
11521152
///
11531153
/// ```
1154+
/// #![feature(path_buf_capacity)]
11541155
/// use std::path::PathBuf;
11551156
///
1156-
/// let path = PathBuf::with_capacity(10);
1157+
/// let mut path = PathBuf::with_capacity(10);
11571158
/// let capacity = path.capacity();
11581159
///
11591160
/// // This push is done without reallocating

0 commit comments

Comments
 (0)