From 29635b9e3833296b2c908914104ba7165d22d3d5 Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Wed, 4 Sep 2024 12:03:13 +0200 Subject: remove `# Panics` and fix clippy --- src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 750580f..be63ff8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,6 @@ pub enum Modloader { impl Modloader { /// # Errors - /// # Panics pub fn from(string: &str) -> MLE { match string { "forge" => Ok(Modloader::Forge), @@ -75,7 +74,6 @@ pub enum VersionLevel { /// Checks if update needed (time) /// if yes: get versions, update /// # Errors -/// # Panics pub async fn check_game_versions(path: &str, force: bool) -> MLE<()> { let p = ProgressBar::new(1); p.set_style(ProgressStyle::with_template(STYLE_MESSAGE).map_err(|_| { @@ -90,7 +88,7 @@ pub async fn check_game_versions(path: &str, force: bool) -> MLE<()> { return Ok(()); } - let versions = get_game_versions().await; + let versions = get_game_versions().await?; remove_file(path)?; let mut file = File::create(path)?; file.write_all(serde_json::to_string_pretty(&versions)?.as_bytes())?; @@ -121,8 +119,6 @@ impl VersionLevel { /// . /// - /// # Panics - /// /// Panics if . /// # Errors pub async fn get( -- cgit v1.2.3