diff options
| author | Aaron Power <theaaronepower@gmail.com> | 2017-01-01 20:13:59 +0000 |
|---|---|---|
| committer | Aaron Power <theaaronepower@gmail.com> | 2017-01-01 20:15:19 +0000 |
| commit | 108293d4e93e3a9dfe6181f72459cbe32553e25f (patch) | |
| tree | f2744291da7877cd8637ff2d66db2c9ab18d7885 /src/libstd | |
| parent | 7b659cfdbce094a790dbb246da2681a47565782a (diff) | |
| download | rust-108293d4e93e3a9dfe6181f72459cbe32553e25f.tar.gz rust-108293d4e93e3a9dfe6181f72459cbe32553e25f.zip | |
Added Default impl to PathBuf
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/path.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index d13baea40a9..b0030504ddc 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1254,6 +1254,13 @@ impl Borrow<Path> for PathBuf { } } +#[stable(feature = "default_for_pathbuf", since = "1.16.0")] +impl Default for PathBuf { + fn default() -> Self { + PathBuf::new() + } +} + #[stable(feature = "cow_from_path", since = "1.6.0")] impl<'a> From<&'a Path> for Cow<'a, Path> { #[inline] |
