Iterate instructions instead of collecting in iced_test::run

This commit is contained in:
Héctor Ramón Jiménez 2025-08-27 06:04:12 +02:00
parent 6a6a2ac8c5
commit d8dbb7568a
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -174,8 +174,7 @@ pub fn run(
preset,
);
let mut instructions: Vec<_> =
ice.instructions.into_iter().rev().collect();
let mut instructions = ice.instructions.into_iter();
loop {
let Some(event) = executor::block_on(receiver.next()) else {
@ -193,7 +192,7 @@ pub fn run(
});
}
emulator::Event::Ready => {
let Some(instruction) = instructions.pop() else {
let Some(instruction) = instructions.next() else {
break;
};