feat(status): started status without nsobject fully implemented
This commit is contained in:
9
src/utils/path.rs
Normal file
9
src/utils/path.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
pub fn to_repo_relative(path: &PathBuf, root: &PathBuf) -> PathBuf {
|
||||
path.strip_prefix(root).unwrap().to_path_buf()
|
||||
}
|
||||
|
||||
pub fn to_string(path: &PathBuf) -> String {
|
||||
path.to_str().unwrap().to_string()
|
||||
}
|
||||
Reference in New Issue
Block a user