1
0
Fork 0
mirror of synced 2024-05-02 11:33:00 +12:00

Remove unused code

This commit is contained in:
Rafał Mikrut 2020-09-20 11:33:55 +02:00
parent b1426d7f95
commit 2804af92e5

View file

@ -106,7 +106,7 @@ impl DuplicateFinder {
allowed_extensions: vec![],
check_method: CheckingMethod::NONE,
delete_method: DeleteMethod::None,
min_file_size: 0,
min_file_size: 1024,
}
}
@ -118,46 +118,6 @@ impl DuplicateFinder {
&self.files_with_identical_hashes
}
// pub fn get_string_from_files_hashes(&self) -> BTreeMap<u64, Vec<Vec<GtkRowData>>> {
// let mut row_data: BTreeMap<u64, Vec<Vec<GtkRowData>>> = Default::default();
// for (size, vector) in &self.files_with_identical_hashes {
// let mut vector_of_vectors: Vec<Vec<GtkRowData>> = Vec::new();
// for files in vector {
// let mut data_vector: Vec<GtkRowData> = Vec::new();
// for file in files {
// let name = file.path.clone();
// let index = name.rfind('/').unwrap();
//
// data_vector.push(GtkRowData {
// name: name[index + 1..].to_string(),
// directory: name[..index].to_string(),
// modification_date: NaiveDateTime::from_timestamp(file.modified_date.duration_since(UNIX_EPOCH).expect("Invalid file date").as_secs() as i64, 0).to_string(),
// });
// }
// vector_of_vectors.push(data_vector);
// }
// row_data.insert(*size, vector_of_vectors);
// }
// row_data
// }
// pub fn get_string_from_files_sizes(&self) -> BTreeMap<u64, Vec<GtkRowData>> {
// let mut row_data: BTreeMap<u64, Vec<GtkRowData>> = Default::default();
// for (size, vector) in &self.files_with_identical_size {
// let mut data_vector: Vec<GtkRowData> = Vec::new();
// for file in vector {
// let name = file.path.clone();
// let index = name.rfind('/').unwrap();
//
// data_vector.push(GtkRowData {
// name: name[index + 1..].to_string(),
// directory: name[..index].to_string(),
// modification_date: NaiveDateTime::from_timestamp(file.modified_date.duration_since(UNIX_EPOCH).expect("Invalid file date").as_secs() as i64, 0).to_string(),
// });
// }
// row_data.insert(*size, data_vector);
// }
// row_data
// }
pub fn get_text_messages(&self) -> &Messages {
&self.text_messages
}