Skip to content

Commit a2800cd

Browse files
authored
Rollup merge of rust-lang#38764 - Aaronepower:master, r=aturon
Added Default impl to PathBuf
2 parents c49d102 + 108293d commit a2800cd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/libstd/path.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,13 @@ impl Borrow<Path> for PathBuf {
12651265
}
12661266
}
12671267

1268+
#[stable(feature = "default_for_pathbuf", since = "1.16.0")]
1269+
impl Default for PathBuf {
1270+
fn default() -> Self {
1271+
PathBuf::new()
1272+
}
1273+
}
1274+
12681275
#[stable(feature = "cow_from_path", since = "1.6.0")]
12691276
impl<'a> From<&'a Path> for Cow<'a, Path> {
12701277
#[inline]

0 commit comments

Comments
 (0)