derive Ord for FileChecked

This commit is contained in:
Jörn-Michael Miehe 2025-06-04 16:44:24 +00:00
parent cb0d8a3d9a
commit 7e9cc00d7c
2 changed files with 2 additions and 6 deletions

View file

@ -76,7 +76,7 @@ impl Cli {
pub fn get_hash(&self) -> String { pub fn get_hash(&self) -> String {
let file_refs = { 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.sort_unstable();
refs refs

View file

@ -11,7 +11,7 @@ use ureq::http::StatusCode;
use super::{Alias, FileUploading, Share, SharryAlias}; 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 { pub struct FileChecked {
path: PathBuf, path: PathBuf,
} }
@ -31,10 +31,6 @@ impl FileChecked {
} }
} }
pub fn get_path(&self) -> &Path {
&self.path
}
pub fn start_upload( pub fn start_upload(
self, self,
http: &ureq::Agent, http: &ureq::Agent,