diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-12-01 08:15:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-01 08:15:23 +0100 |
| commit | 61d50fd0ace395be484dfe7a4e03f329c1ca2444 (patch) | |
| tree | 1393a652a6c541ea1548ac4481546aa7b708b3a2 /library/std/src/path.rs | |
| parent | ec7caabe9774a056cb21cd47b4489aed7a9c3659 (diff) | |
| parent | d599d5a381ecceabd0b662af73982257545cbe1a (diff) | |
| download | rust-61d50fd0ace395be484dfe7a4e03f329c1ca2444.tar.gz rust-61d50fd0ace395be484dfe7a4e03f329c1ca2444.zip | |
Rollup merge of #133602 - SanchithHegde:fix-pathbuf-example-codeblocks, r=cuviper
fix: fix codeblocks in `PathBuf` example This PR adds missing codeblocks around an example included in the `PathBuf` documentation.
Diffstat (limited to 'library/std/src/path.rs')
| -rw-r--r-- | library/std/src/path.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 635c7bca0e0..5b277a982ee 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -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. |
