Fixed doc example for Path::with_capacity

This commit is contained in:
Aaron Stillwell 2019-02-18 17:42:07 +00:00
parent 35d8c4400d
commit c9fbcc1f39

View File

@ -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