diff --git a/src/commands.rs b/src/commands.rs index b9d9f63..b7979d4 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -79,7 +79,7 @@ pub fn handle(command: SubCommand) -> Result<(), Box> { println!( "{}{}", style("OSB-Paketinhalt: ").bold().yellow(), - style(format!("{}", file.filename())).bold() + style(file.filename()).bold() ); let mut content: OnkostarEditor = match file.try_into() { @@ -104,7 +104,7 @@ pub fn handle(command: SubCommand) -> Result<(), Box> { println!( "{}{}{}", style("OSB-Paketinhalt: ").bold().yellow(), - style(format!("{}", file.filename())).bold(), + style(file.filename()).bold(), style(" ignoriert").yellow() ); } diff --git a/src/file_io.rs b/src/file_io.rs index 1af9825..75abdb9 100644 --- a/src/file_io.rs +++ b/src/file_io.rs @@ -1,7 +1,7 @@ /* * MIT License * - * Copyright (c) 2023 Comprehensive Cancer Center Mainfranken + * Copyright (c) 2024 Comprehensive Cancer Center Mainfranken * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -193,7 +193,7 @@ impl TryFrom for Profile { type Error = FileError; fn try_from(value: InputFile) -> Result { - return match value { + match value { InputFile::Yaml { filename, content } => match Profile::from_str(&content) { Ok(profile) => Ok(profile), Err(err) => Err(FileError::Parsing(filename, err)), @@ -204,7 +204,7 @@ impl TryFrom for Profile { filename, "Keine Profildatei".to_string(), )), - }; + } } }