cleaning warnings
This commit is contained in:
@@ -18,7 +18,6 @@ pub struct AddArgs<'a> {
|
||||
|
||||
// todo match deleted files
|
||||
// todo match weird reg expression
|
||||
// todo -A == .
|
||||
pub fn add(args: AddArgs) {
|
||||
// write all modification in the index
|
||||
if args.all {
|
||||
@@ -104,7 +103,6 @@ fn add_folder_content(path: PathBuf, added_files: &mut Vec<String>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn write_all() {
|
||||
@@ -114,6 +112,6 @@ fn write_all() {
|
||||
.create(true)
|
||||
.open(index::path()).expect("Cannot open index file");
|
||||
for obj in objs {
|
||||
writeln!(index_file, "{}", path_buf_to_string(obj.path.clone()));
|
||||
let _ = writeln!(index_file, "{}", path_buf_to_string(obj.path.clone()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,10 +91,10 @@ pub fn clone(args: CloneArgs) {
|
||||
}
|
||||
}
|
||||
|
||||
let downloader = Downloader::new()
|
||||
Downloader::new()
|
||||
.set_api_props(api_props.clone())
|
||||
.set_files(files)
|
||||
//.should_log()
|
||||
.should_log()
|
||||
.download(ref_path.clone(), Some(&save_blob));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ pub fn pull() {
|
||||
}
|
||||
}
|
||||
|
||||
let downloader = Downloader::new()
|
||||
Downloader::new()
|
||||
.set_api_props(get_api_props())
|
||||
.set_files(files)
|
||||
.should_log()
|
||||
|
||||
@@ -96,7 +96,6 @@ impl PushFactory {
|
||||
State::Moved => Box::new(Moved { obj }),
|
||||
State::Copied => Box::new(Copied { obj }),
|
||||
State::Default => todo!(),
|
||||
_ => todo!(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ pub fn remote_diff() {
|
||||
.unwrap()
|
||||
.strip_prefix(path::repo_root()).unwrap().to_path_buf();
|
||||
let (folders, files) = get_diff(relative_p);
|
||||
dbg!(files);
|
||||
return;
|
||||
|
||||
for folder in folders {
|
||||
println!("should pull {}", folder.clone().relative_s.unwrap());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::fs::File;
|
||||
use std::path::PathBuf;
|
||||
use std::io::{self, Lines, BufReader};
|
||||
use std::io::{Lines, BufReader};
|
||||
use std::collections::HashMap;
|
||||
use crypto::digest::Digest;
|
||||
use crypto::sha1::Sha1;
|
||||
|
||||
Reference in New Issue
Block a user