Skip to content

Commit 71125d5

Browse files
committed
Implemented PathBuf::new
1 parent 47ef222 commit 71125d5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/path/pathbuf.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@ impl PathBuf {
5151
pub fn into_os_string(self) -> OsString {
5252
self.inner.into_os_string()
5353
}
54+
55+
/// Allocates an empty `PathBuf`.
56+
///
57+
/// # Examples
58+
///
59+
/// ```
60+
/// use async_std::path::PathBuf;
61+
///
62+
/// let path = PathBuf::new();
63+
/// ```
64+
pub fn new() -> PathBuf {
65+
std::path::PathBuf::new().into()
66+
}
5467
}
5568

5669
impl From<std::path::PathBuf> for PathBuf {

0 commit comments

Comments
 (0)