mirror of
https://github.com/pcvolkmer/osc-variant.git
synced 2025-04-20 20:26:50 +00:00
refactor: do not use format!()
This commit is contained in:
parent
10f737cb41
commit
e70b30112b
@ -79,7 +79,7 @@ pub fn handle(command: SubCommand) -> Result<(), Box<dyn Error>> {
|
|||||||
println!(
|
println!(
|
||||||
"{}{}",
|
"{}{}",
|
||||||
style("OSB-Paketinhalt: ").bold().yellow(),
|
style("OSB-Paketinhalt: ").bold().yellow(),
|
||||||
style(format!("{}", file.filename())).bold()
|
style(file.filename()).bold()
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut content: OnkostarEditor = match file.try_into() {
|
let mut content: OnkostarEditor = match file.try_into() {
|
||||||
@ -104,7 +104,7 @@ pub fn handle(command: SubCommand) -> Result<(), Box<dyn Error>> {
|
|||||||
println!(
|
println!(
|
||||||
"{}{}{}",
|
"{}{}{}",
|
||||||
style("OSB-Paketinhalt: ").bold().yellow(),
|
style("OSB-Paketinhalt: ").bold().yellow(),
|
||||||
style(format!("{}", file.filename())).bold(),
|
style(file.filename()).bold(),
|
||||||
style(" ignoriert").yellow()
|
style(" ignoriert").yellow()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* MIT License
|
* 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
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -193,7 +193,7 @@ impl TryFrom<InputFile> for Profile {
|
|||||||
type Error = FileError;
|
type Error = FileError;
|
||||||
|
|
||||||
fn try_from(value: InputFile) -> Result<Self, Self::Error> {
|
fn try_from(value: InputFile) -> Result<Self, Self::Error> {
|
||||||
return match value {
|
match value {
|
||||||
InputFile::Yaml { filename, content } => match Profile::from_str(&content) {
|
InputFile::Yaml { filename, content } => match Profile::from_str(&content) {
|
||||||
Ok(profile) => Ok(profile),
|
Ok(profile) => Ok(profile),
|
||||||
Err(err) => Err(FileError::Parsing(filename, err)),
|
Err(err) => Err(FileError::Parsing(filename, err)),
|
||||||
@ -204,7 +204,7 @@ impl TryFrom<InputFile> for Profile {
|
|||||||
filename,
|
filename,
|
||||||
"Keine Profildatei".to_string(),
|
"Keine Profildatei".to_string(),
|
||||||
)),
|
)),
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user