summaryrefslogtreecommitdiff
path: root/src/commands/modification.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2024-09-04 09:56:42 +0200
committerfxqnlr <[email protected]>2024-09-04 09:56:42 +0200
commitf5e070cdf6628a5ebd981d373929802317104e24 (patch)
treee31c88371737e20b2cc79bf9ee0c1dbfdeb6e727 /src/commands/modification.rs
parent1d64516ed95266a4fc1f8a18652f99158a4004f1 (diff)
downloadmodlist-f5e070cdf6628a5ebd981d373929802317104e24.tar
modlist-f5e070cdf6628a5ebd981d373929802317104e24.tar.gz
modlist-f5e070cdf6628a5ebd981d373929802317104e24.zip
clippy --fix
Diffstat (limited to 'src/commands/modification.rs')
-rw-r--r--src/commands/modification.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/commands/modification.rs b/src/commands/modification.rs
index 4488b70..e0e54b2 100644
--- a/src/commands/modification.rs
+++ b/src/commands/modification.rs
@@ -65,7 +65,7 @@ pub async fn mod_add(
65 add_p.inc(1); 65 add_p.inc(1);
66 match m.id { 66 match m.id {
67 IDSelector::ModificationID(pid) => { 67 IDSelector::ModificationID(pid) => {
68 mod_ids.push((pid, m.set_version)) 68 mod_ids.push((pid, m.set_version));
69 } 69 }
70 IDSelector::VersionID(vid) => ver_ids.push((vid, m.set_version)), 70 IDSelector::VersionID(vid) => ver_ids.push((vid, m.set_version)),
71 } 71 }
@@ -153,7 +153,7 @@ pub async fn mod_add(
153 }?; 153 }?;
154 154
155 if project.current_version.is_some() { 155 if project.current_version.is_some() {
156 downloadstack.push(project.current_version.unwrap()) 156 downloadstack.push(project.current_version.unwrap());
157 }; 157 };
158 158
159 project_p.inc(1); 159 project_p.inc(1);
@@ -245,7 +245,7 @@ async fn get_mod_infos(
245 applicable_versions: available_versions_vec, 245 applicable_versions: available_versions_vec,
246 download_link: file, 246 download_link: file,
247 set_version: *setmap.get(&project.slug).unwrap(), 247 set_version: *setmap.get(&project.slug).unwrap(),
248 }) 248 });
249 } else { 249 } else {
250 current_version = None; 250 current_version = None;
251 file = String::from("NONE"); 251 file = String::from("NONE");
@@ -258,7 +258,7 @@ async fn get_mod_infos(
258 applicable_versions: available_versions_vec, 258 applicable_versions: available_versions_vec,
259 download_link: file, 259 download_link: file,
260 set_version: *setmap.get(&project.id).unwrap(), 260 set_version: *setmap.get(&project.id).unwrap(),
261 }) 261 });
262 } 262 }
263 } 263 }
264 264
@@ -308,7 +308,7 @@ async fn get_ver_info(
308 applicable_versions: vec![String::from(&version.id)], 308 applicable_versions: vec![String::from(&version.id)],
309 download_link: file, 309 download_link: file,
310 set_version: *setmap.get(&version.id).unwrap(), 310 set_version: *setmap.get(&version.id).unwrap(),
311 }) 311 });
312 } 312 }
313 Ok(projectinfo) 313 Ok(projectinfo)
314} 314}
@@ -335,7 +335,7 @@ pub fn mod_remove(config: &Cfg, id: &str, list: &List) -> MLE<()> {
335 335
336 progress.set_message("Delete file"); 336 progress.set_message("Delete file");
337 match delete_version(list, version) { 337 match delete_version(list, version) {
338 Ok(_) => (), 338 Ok(()) => (),
339 Err(err) => { 339 Err(err) => {
340 if err.to_string() 340 if err.to_string()
341 != "User input not accepted: VERSION_NOT_FOUND_IN_FILES" 341 != "User input not accepted: VERSION_NOT_FOUND_IN_FILES"