2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-16 10:49:55 +00:00

Implemented PathBuf::new

This commit is contained in:
Wouter Geraedts 2019-10-13 21:19:23 +02:00
parent 47ef222dab
commit 71125d5c3b

View file

@ -51,6 +51,19 @@ impl PathBuf {
pub fn into_os_string(self) -> OsString {
self.inner.into_os_string()
}
/// Allocates an empty `PathBuf`.
///
/// # Examples
///
/// ```
/// use async_std::path::PathBuf;
///
/// let path = PathBuf::new();
/// ```
pub fn new() -> PathBuf {
std::path::PathBuf::new().into()
}
}
impl From<std::path::PathBuf> for PathBuf {