forked from mirror/async-std
Implemented PathBuf::new
This commit is contained in:
parent
47ef222dab
commit
71125d5c3b
1 changed files with 13 additions and 0 deletions
|
@ -51,6 +51,19 @@ impl PathBuf {
|
||||||
pub fn into_os_string(self) -> OsString {
|
pub fn into_os_string(self) -> OsString {
|
||||||
self.inner.into_os_string()
|
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 {
|
impl From<std::path::PathBuf> for PathBuf {
|
||||||
|
|
Loading…
Reference in a new issue