From f9e0fc5f6a5f614b02b8c4123c0f54a4b188a1bb Mon Sep 17 00:00:00 2001 From: Fedor Tolstonozhenko Date: Sun, 29 Sep 2024 16:38:33 +0200 Subject: [PATCH] Fix typo in Package field --- crates/opensi-core/src/lib.rs | 5 ++--- crates/opensi-editor/src/package_tab.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/opensi-core/src/lib.rs b/crates/opensi-core/src/lib.rs index 17d01ed..46411ef 100644 --- a/crates/opensi-core/src/lib.rs +++ b/crates/opensi-core/src/lib.rs @@ -31,8 +31,8 @@ pub struct Package { pub language: Option, #[serde(rename = "@logo")] pub logo: Option, - #[serde(rename = "@restriciton")] - pub restriciton: Option, + #[serde(rename = "@restriction")] + pub restriction: Option, // elements pub info: Info, @@ -303,7 +303,6 @@ impl PackageNode { } #[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq)] - pub struct Info { pub comments: Option, pub extension: Option, diff --git a/crates/opensi-editor/src/package_tab.rs b/crates/opensi-editor/src/package_tab.rs index 3c8a85d..2f71a78 100644 --- a/crates/opensi-editor/src/package_tab.rs +++ b/crates/opensi-editor/src/package_tab.rs @@ -37,7 +37,7 @@ fn package_info_edit(package: &mut Package, ui: &mut egui::Ui) { ui.add(egui::DragValue::new(&mut package.difficulty).range(0..=10)); }); package_edit_row("Ограничения", &mut body, |ui| { - let mut s = package.restriciton.clone().unwrap(); + let mut s = package.restriction.clone().unwrap(); ui.text_edit_singleline(&mut s); }); package_edit_row("Дата создания", &mut body, |ui| {