Capitalize mode value in ice metadata
This commit is contained in:
parent
c8ccba5535
commit
b20168b614
3 changed files with 7 additions and 8 deletions
|
|
@ -586,10 +586,7 @@ fn presets() -> impl Iterator<Item = iced::application::Preset<Todos, Message>>
|
|||
|
||||
[
|
||||
Preset::new("Empty", || {
|
||||
(
|
||||
Todos::Loading,
|
||||
Command::done(Message::Loaded(Err(LoadError::File))),
|
||||
)
|
||||
(Todos::Loaded(State::default()), Command::none())
|
||||
}),
|
||||
Preset::new("Carl Sagan", || {
|
||||
(
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
viewport: 512x768
|
||||
mode: impatient
|
||||
mode: Impatient
|
||||
preset: Empty
|
||||
-----
|
||||
click at "What needs to be done?"
|
||||
|
|
@ -7,6 +7,8 @@ type "Create the universe"
|
|||
type enter
|
||||
type "Make an apple pie"
|
||||
type enter
|
||||
expect "2 tasks left"
|
||||
click at "Create the universe"
|
||||
expect "1 task left"
|
||||
click at "Make an apple pie"
|
||||
expect "0 tasks left"
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
}
|
||||
)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue