Capitalize mode value in ice metadata

This commit is contained in:
Héctor Ramón Jiménez 2025-08-20 14:43:37 +02:00
parent c8ccba5535
commit b20168b614
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 7 additions and 8 deletions

View file

@ -51,7 +51,7 @@ impl Ice {
);
}
"mode" => {
mode = Some(match value.trim() {
mode = Some(match value.trim().to_lowercase().as_str() {
"patient" => emulator::Mode::Patient,
"impatient" => emulator::Mode::Impatient,
_ => {
@ -118,8 +118,8 @@ impl std::fmt::Display for Ice {
f,
"mode: {}",
match self.mode {
emulator::Mode::Patient => "patient",
emulator::Mode::Impatient => "impatient",
emulator::Mode::Patient => "Patient",
emulator::Mode::Impatient => "Impatient",
}
)?;