Skip to content

Commit 4ee11f4

Browse files
Nick Hamannsteveklabnik
authored andcommitted
Separate code into two code blocks
1 parent 68f8c54 commit 4ee11f4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libstd/path.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,12 +1240,13 @@ impl Path {
12401240
/// use std::path::Path;
12411241
///
12421242
/// Path::new("foo.txt");
1243+
/// ```
1244+
///
1245+
/// You can create `Path`s from `String`s, or even other `Path`s:
12431246
///
1244-
/// // Strings work too:
1247+
/// ```
12451248
/// let s = String::from("bar.txt");
12461249
/// let p = Path::new(&s);
1247-
///
1248-
/// // As do other `Path`s:
12491250
/// Path::new(&p);
12501251
/// ```
12511252
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)