refactor(tree): create impl Tree

This commit is contained in:
grimhilt
2024-02-25 17:34:16 +01:00
parent faf7341525
commit 7951ad0520
12 changed files with 306 additions and 225 deletions

View File

@@ -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)