Skip to content

Commit ba4d55d

Browse files
author
Nick Hamann
committed
Separate code into two code blocks
1 parent e178495 commit ba4d55d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libstd/path.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1248,12 +1248,13 @@ impl Path {
12481248
/// use std::path::Path;
12491249
///
12501250
/// Path::new("foo.txt");
1251+
/// ```
1252+
///
1253+
/// You can create `Path`s from `String`s, or even other `Path`s:
12511254
///
1252-
/// // Strings work too:
1255+
/// ```
12531256
/// let s = String::from("bar.txt");
12541257
/// let p = Path::new(&s);
1255-
///
1256-
/// // As do other `Path`s:
12571258
/// Path::new(&p);
12581259
/// ```
12591260
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)