Improve naming of Error variants in iced_test

This commit is contained in:
Héctor Ramón Jiménez 2025-08-27 06:18:23 +02:00
parent ed873514e5
commit 1c54f5e3e9
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 9 additions and 10 deletions

View file

@ -180,16 +180,15 @@ pub fn run(
let mut instructions = ice.instructions.into_iter();
loop {
let Some(event) = executor::block_on(receiver.next()) else {
panic!("emulator runtime stopped unexpectedly");
};
let event = executor::block_on(receiver.next())
.expect("emulator runtime should never stop on its own");
match event {
emulator::Event::Action(action) => {
emulator.perform(&program, action);
}
emulator::Event::Failed(instruction) => {
return Err(Error::IceFailed {
return Err(Error::IceTestingFailed {
file: file.path().to_path_buf(),
instruction,
});