derive Ord for FileChecked
This commit is contained in:
parent
cb0d8a3d9a
commit
7e9cc00d7c
2 changed files with 2 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue