fix: minor warnings
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user