refactor(tree): create impl Tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::path::PathBuf;
|
||||
use std::path::{PathBuf, Path};
|
||||
|
||||
pub trait IntoPathBuf {
|
||||
fn into(self) -> PathBuf;
|
||||
@@ -10,6 +10,12 @@ impl IntoPathBuf for PathBuf {
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoPathBuf for &Path {
|
||||
fn into(self) -> PathBuf {
|
||||
PathBuf::from(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoPathBuf for String {
|
||||
fn into(self) -> PathBuf {
|
||||
PathBuf::from(self)
|
||||
|
||||
Reference in New Issue
Block a user