diff --git a/src/cli.rs b/src/cli.rs index fd5da89..6e96e3b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -76,7 +76,7 @@ impl Cli { pub fn get_hash(&self) -> String { let file_refs = { - let mut refs: Vec<_> = self.files.iter().map(FileChecked::get_path).collect(); + let mut refs: Vec<_> = self.files.iter().collect(); refs.sort_unstable(); refs diff --git a/src/sharry/file/checked.rs b/src/sharry/file/checked.rs index d94c2a4..87e6054 100644 --- a/src/sharry/file/checked.rs +++ b/src/sharry/file/checked.rs @@ -11,7 +11,7 @@ use ureq::http::StatusCode; use super::{Alias, FileUploading, Share, SharryAlias}; -#[derive(Serialize, Deserialize, Debug, Clone, Hash)] +#[derive(Debug, Clone, Hash, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)] pub struct FileChecked { path: PathBuf, } @@ -31,10 +31,6 @@ impl FileChecked { } } - pub fn get_path(&self) -> &Path { - &self.path - } - pub fn start_upload( self, http: &ureq::Agent,