From 108293d4e93e3a9dfe6181f72459cbe32553e25f Mon Sep 17 00:00:00 2001 From: Aaron Power Date: Sun, 1 Jan 2017 20:13:59 +0000 Subject: [PATCH] Added Default impl to PathBuf --- src/libstd/path.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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 @@ fn borrow(&self) -> &Path { } } +#[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]