Rename Mode::Impatient to Immediate
This commit is contained in:
parent
33256ac444
commit
364b68f030
3 changed files with 8 additions and 16 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
viewport: 500x800
|
viewport: 500x800
|
||||||
mode: Impatient
|
mode: Immediate
|
||||||
preset: Empty
|
preset: Empty
|
||||||
-----
|
-----
|
||||||
click at "What needs to be done?"
|
click at "What needs to be done?"
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,7 @@ impl<P: Program + 'static> Emulator<P> {
|
||||||
.boxed(),
|
.boxed(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Mode::Impatient => {
|
Mode::Immediate => {
|
||||||
self.runtime.run(
|
self.runtime.run(
|
||||||
stream
|
stream
|
||||||
.map(Action_::Runtime)
|
.map(Action_::Runtime)
|
||||||
|
|
@ -452,12 +452,12 @@ pub enum Mode {
|
||||||
/// Waits only for the tasks directly spawned by an [`Instruction`].
|
/// Waits only for the tasks directly spawned by an [`Instruction`].
|
||||||
Patient,
|
Patient,
|
||||||
/// Never waits for any tasks to finish.
|
/// Never waits for any tasks to finish.
|
||||||
Impatient,
|
Immediate,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Mode {
|
impl Mode {
|
||||||
/// A list of all the available modes.
|
/// A list of all the available modes.
|
||||||
pub const ALL: &[Self] = &[Self::Zen, Self::Patient, Self::Impatient];
|
pub const ALL: &[Self] = &[Self::Zen, Self::Patient, Self::Immediate];
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Mode {
|
impl fmt::Display for Mode {
|
||||||
|
|
@ -465,7 +465,7 @@ impl fmt::Display for Mode {
|
||||||
f.write_str(match self {
|
f.write_str(match self {
|
||||||
Self::Zen => "Zen",
|
Self::Zen => "Zen",
|
||||||
Self::Patient => "Patient",
|
Self::Patient => "Patient",
|
||||||
Self::Impatient => "Impatient",
|
Self::Immediate => "Immediate",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ impl Ice {
|
||||||
///
|
///
|
||||||
/// ```text
|
/// ```text
|
||||||
/// viewport: 500x800
|
/// viewport: 500x800
|
||||||
/// mode: Impatient
|
/// mode: Immediate
|
||||||
/// preset: Empty
|
/// preset: Empty
|
||||||
/// -----
|
/// -----
|
||||||
/// click at "What needs to be done?"
|
/// click at "What needs to be done?"
|
||||||
|
|
@ -96,7 +96,7 @@ impl Ice {
|
||||||
mode = Some(match value.trim().to_lowercase().as_str() {
|
mode = Some(match value.trim().to_lowercase().as_str() {
|
||||||
"zen" => emulator::Mode::Zen,
|
"zen" => emulator::Mode::Zen,
|
||||||
"patient" => emulator::Mode::Patient,
|
"patient" => emulator::Mode::Patient,
|
||||||
"impatient" => emulator::Mode::Impatient,
|
"immediate" => emulator::Mode::Immediate,
|
||||||
_ => {
|
_ => {
|
||||||
return Err(ParseError::InvalidMode {
|
return Err(ParseError::InvalidMode {
|
||||||
line: i,
|
line: i,
|
||||||
|
|
@ -157,15 +157,7 @@ impl std::fmt::Display for Ice {
|
||||||
height = self.viewport.height as u32, // TODO
|
height = self.viewport.height as u32, // TODO
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
writeln!(
|
writeln!(f, "mode: {}", self.mode)?;
|
||||||
f,
|
|
||||||
"mode: {}",
|
|
||||||
match self.mode {
|
|
||||||
emulator::Mode::Zen => "Zen",
|
|
||||||
emulator::Mode::Patient => "Patient",
|
|
||||||
emulator::Mode::Impatient => "Impatient",
|
|
||||||
}
|
|
||||||
)?;
|
|
||||||
|
|
||||||
if let Some(preset) = &self.preset {
|
if let Some(preset) = &self.preset {
|
||||||
writeln!(f, "preset: {preset}")?;
|
writeln!(f, "preset: {preset}")?;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue