fix: minor warnings

This commit is contained in:
grimhilt
2024-02-20 21:28:18 +01:00
parent 287953c086
commit eaacff0e55
5 changed files with 5 additions and 10 deletions

View File

@@ -131,7 +131,7 @@ fn rm(hash: &str) -> io::Result<()> {
fn rm_node(path: &Path, node: &str) -> io::Result<()> {
let mut root = path::objects();
let (dir, rest) = hash_obj(path.clone().to_str().unwrap());
let (dir, rest) = hash_obj(path.to_str().unwrap());
root.push(dir);
root.push(rest);
@@ -143,7 +143,7 @@ fn rm_node(path: &Path, node: &str) -> io::Result<()> {
fn add_node(path: &Path, node: &str) -> io::Result<()> {
let mut root = path::objects();
let (dir, rest) = hash_obj(path.clone().to_str().unwrap());
let (dir, rest) = hash_obj(path.to_str().unwrap());
root.push(dir);
if !root.exists() {
@@ -168,7 +168,7 @@ fn update_dates(mut path: PathBuf, date: &str) -> io::Result<()> {
let (dir, res) = hash_obj(path.to_str().unwrap());
obj_p.push(dir);
obj_p.push(res);
update_date(obj_p.clone(), date.clone())?;
update_date(obj_p.clone(), date)?;
obj_p.pop();
obj_p.pop();
}