1
0
mirror of https://github.com/pcvolkmer/osc-variant.git synced 2025-12-12 14:13:20 +00:00

refactor: code cleanup

This commit is contained in:
2025-11-19 08:39:03 +01:00
parent 21eb19aff1
commit 1938671cf2
3 changed files with 7 additions and 10 deletions

View File

@@ -195,8 +195,7 @@ pub fn print() {
.bold()
);
for problem in vec![
Problem {
for problem in [Problem {
code: "2023-0001",
name: "Unterformular mit Markierung 'hat Unterformulare'",
description: " Aktuell gibt es keine Unterformulare in Unterformularen, daher\n \
@@ -220,7 +219,7 @@ pub fn print() {
" Treten Leerzeichen am Ende der Plausibilitätsregel-Bezeichnung auf,\n \
führt dies zu Fehlern beim Import der OSC-Datei.\n\n \
Das Problem wird beim Verwenden des Unterbefehls 'modify' automatisch\n \
behoben und Leerzeichen entfernt.
behoben und Leerzeichen entfernt.
",
fixable: true,
},
@@ -234,7 +233,7 @@ pub fn print() {
auftreten.\n\n \
In diesem Fall kann ein erneuter/zweiter Import helfen, da das Onkostar in\n \
diesem Fall alle Formulare importiert hat und der Formularverweis dann \n \
gespeichert werden kann.
gespeichert werden kann.
",
fixable: false,
},
@@ -246,8 +245,7 @@ pub fn print() {
Dieses Problem muss manuell behoben werden.
",
fixable: false,
},
] {
}] {
println!("{problem}\n");
}
}

View File

@@ -84,9 +84,8 @@ impl InputFile {
InputFile::Osb { filename, .. }
| InputFile::Osc { filename, .. }
| InputFile::Yaml { filename, .. }
| InputFile::Other { filename, .. } => filename,
| InputFile::Other { filename, .. } => filename.clone(),
}
.to_string()
}
#[allow(unused_variables)]

View File

@@ -106,7 +106,7 @@ impl Requires for DataCatalogue {
.iter()
.filter(|&entry| entry.property_catalogue.is_some())
.map(|entry| match &entry.property_catalogue {
Some(entry) => entry.to_string(),
Some(entry) => entry.clone(),
_ => String::new(),
})
.collect::<HashSet<_>>()
@@ -141,7 +141,7 @@ impl Requires for DataCatalogue {
impl FolderContent for DataCatalogue {
fn get_library_folder(&self) -> String {
self.ordner.bibliothek.name.to_string()
self.ordner.bibliothek.name.clone()
}
}