fix: fix codeblocks in PathBuf
example
This commit is contained in:
parent
a2545fd6fc
commit
d599d5a381
1 changed files with 2 additions and 0 deletions
|
@ -1158,6 +1158,7 @@ impl FusedIterator for Ancestors<'_> {}
|
|||
/// Note that `PathBuf` does not always sanitize arguments, for example
|
||||
/// [`push`] allows paths built from strings which include separators:
|
||||
///
|
||||
/// ```
|
||||
/// use std::path::PathBuf;
|
||||
///
|
||||
/// let mut path = PathBuf::new();
|
||||
|
@ -1166,6 +1167,7 @@ impl FusedIterator for Ancestors<'_> {}
|
|||
/// path.push("windows");
|
||||
/// path.push(r"..\otherdir");
|
||||
/// path.push("system32");
|
||||
/// ```
|
||||
///
|
||||
/// The behavior of `PathBuf` may be changed to a panic on such inputs
|
||||
/// in the future. [`Extend::extend`] should be used to add multi-part paths.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue