From f7a6d2e9c67c1fdf8fc17fa0461a201fd2720537 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Thu, 19 Jan 2023 18:37:42 +0100 Subject: input mostly inplemented, mods missing --- src/files.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/files.rs') diff --git a/src/files.rs b/src/files.rs index 998ed32..14e5636 100644 --- a/src/files.rs +++ b/src/files.rs @@ -85,12 +85,12 @@ pub fn get_file_path(list: List, versionid: String) -> MLE { Ok(filename.to_owned()) } -pub fn get_downloaded_versions(list: List) -> Result, Box> { +pub fn get_downloaded_versions(list: List) -> MLE> { let mut versions: HashMap = HashMap::new(); for file in read_dir(&list.download_folder)? { let path = file?.path(); - if path.is_file() && path.extension().ok_or("BAH")? == "jar" { - let pathstr = path.to_str().ok_or("BAH")?; + if path.is_file() && path.extension().ok_or("BAH").unwrap() == "jar" { + let pathstr = path.to_str().ok_or("BAH").unwrap(); let namesplit: Vec<&str> = pathstr.split('.').collect(); versions.insert(String::from(namesplit[namesplit.len() - 3]), String::from(namesplit[namesplit.len() - 2])); } -- cgit v1.2.3