fix: minor warnings
This commit is contained in:
parent
287953c086
commit
eaacff0e55
@ -1,16 +1,12 @@
|
|||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::fs::OpenOptions;
|
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use clap::Values;
|
use clap::Values;
|
||||||
use glob::glob;
|
use glob::glob;
|
||||||
use crate::store::index;
|
|
||||||
use crate::store::{self, object::Object};
|
use crate::store::{self, object::Object};
|
||||||
use crate::utils::{self, path};
|
use crate::utils::{self, path};
|
||||||
use crate::utils::nextsyncignore::{self, ignore_file};
|
use crate::utils::nextsyncignore::{self, ignore_file};
|
||||||
use crate::utils::path::{normalize_relative, repo_root, path_buf_to_string};
|
use crate::utils::path::{normalize_relative, repo_root, path_buf_to_string};
|
||||||
|
|
||||||
use super::status::get_all_objs;
|
|
||||||
|
|
||||||
pub struct AddArgs<'a> {
|
pub struct AddArgs<'a> {
|
||||||
pub files: Option<Values<'a>>,
|
pub files: Option<Values<'a>>,
|
||||||
pub force: bool,
|
pub force: bool,
|
||||||
|
@ -2,7 +2,6 @@ use std::fs::OpenOptions;
|
|||||||
use clap::Values;
|
use clap::Values;
|
||||||
use std::io::{self, Write, BufRead, Seek, SeekFrom};
|
use std::io::{self, Write, BufRead, Seek, SeekFrom};
|
||||||
use crate::utils::{path, read};
|
use crate::utils::{path, read};
|
||||||
use tempfile::tempfile;
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
pub struct ConfigSetArgs<'a> {
|
pub struct ConfigSetArgs<'a> {
|
||||||
|
@ -131,7 +131,7 @@ fn rm(hash: &str) -> io::Result<()> {
|
|||||||
|
|
||||||
fn rm_node(path: &Path, node: &str) -> io::Result<()> {
|
fn rm_node(path: &Path, node: &str) -> io::Result<()> {
|
||||||
let mut root = path::objects();
|
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(dir);
|
||||||
root.push(rest);
|
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<()> {
|
fn add_node(path: &Path, node: &str) -> io::Result<()> {
|
||||||
let mut root = path::objects();
|
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(dir);
|
||||||
if !root.exists() {
|
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());
|
let (dir, res) = hash_obj(path.to_str().unwrap());
|
||||||
obj_p.push(dir);
|
obj_p.push(dir);
|
||||||
obj_p.push(res);
|
obj_p.push(res);
|
||||||
update_date(obj_p.clone(), date.clone())?;
|
update_date(obj_p.clone(), date)?;
|
||||||
obj_p.pop();
|
obj_p.pop();
|
||||||
obj_p.pop();
|
obj_p.pop();
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use clap::{App, Arg, SubCommand};
|
use clap::{App, SubCommand};
|
||||||
|
|
||||||
pub fn create() -> App<'static, 'static> {
|
pub fn create() -> App<'static, 'static> {
|
||||||
SubCommand::with_name("push")
|
SubCommand::with_name("push")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use clap::{App, Arg, SubCommand};
|
use clap::{App, SubCommand};
|
||||||
|
|
||||||
pub fn create() -> App<'static, 'static> {
|
pub fn create() -> App<'static, 'static> {
|
||||||
SubCommand::with_name("reset")
|
SubCommand::with_name("reset")
|
||||||
|
Loading…
Reference in New Issue
Block a user