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/commands/io.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/commands/io.rs') diff --git a/src/commands/io.rs b/src/commands/io.rs index c9691c4..3e171f1 100644 --- a/src/commands/io.rs +++ b/src/commands/io.rs @@ -68,7 +68,6 @@ impl ExportList { } /// # Errors -/// # Panics pub fn export(config: &Cfg, list: Option) -> MLE<()> { let progress = ProgressBar::new_spinner(); progress.set_style( @@ -103,7 +102,7 @@ pub fn export(config: &Cfg, list: Option) -> MLE<()> { .join("mlexport.toml") .into_os_string() .into_string() - .unwrap(); + .map_err(|_| MLErr::new(EType::IoError, "No String"))?; progress.set_message("Create file"); let mut file = File::create(&filestr)?; -- cgit v1.2.3