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", || {
|
Preset::new("Empty", || {
|
||||||
(
|
(Todos::Loaded(State::default()), Command::none())
|
||||||
Todos::Loading,
|
|
||||||
Command::done(Message::Loaded(Err(LoadError::File))),
|
|
||||||
)
|
|
||||||
}),
|
}),
|
||||||
Preset::new("Carl Sagan", || {
|
Preset::new("Carl Sagan", || {
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
viewport: 512x768
|
viewport: 512x768
|
||||||
mode: impatient
|
mode: Impatient
|
||||||
preset: Empty
|
preset: Empty
|
||||||
-----
|
-----
|
||||||
click at "What needs to be done?"
|
click at "What needs to be done?"
|
||||||
|
|
@ -7,6 +7,8 @@ type "Create the universe"
|
||||||
type enter
|
type enter
|
||||||
type "Make an apple pie"
|
type "Make an apple pie"
|
||||||
type enter
|
type enter
|
||||||
|
expect "2 tasks left"
|
||||||
click at "Create the universe"
|
click at "Create the universe"
|
||||||
|
expect "1 task left"
|
||||||
click at "Make an apple pie"
|
click at "Make an apple pie"
|
||||||
expect "0 tasks left"
|
expect "0 tasks left"
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ impl Ice {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
"mode" => {
|
"mode" => {
|
||||||
mode = Some(match value.trim() {
|
mode = Some(match value.trim().to_lowercase().as_str() {
|
||||||
"patient" => emulator::Mode::Patient,
|
"patient" => emulator::Mode::Patient,
|
||||||
"impatient" => emulator::Mode::Impatient,
|
"impatient" => emulator::Mode::Impatient,
|
||||||
_ => {
|
_ => {
|
||||||
|
|
@ -118,8 +118,8 @@ impl std::fmt::Display for Ice {
|
||||||
f,
|
f,
|
||||||
"mode: {}",
|
"mode: {}",
|
||||||
match self.mode {
|
match self.mode {
|
||||||
emulator::Mode::Patient => "patient",
|
emulator::Mode::Patient => "Patient",
|
||||||
emulator::Mode::Impatient => "impatient",
|
emulator::Mode::Impatient => "Impatient",
|
||||||
}
|
}
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue