Ensure rendering loop continues
@@ -94,13 +94,17 @@ where
M: Inbox<'m, Self> + 'm,
{
async move {
+ loop {
match with_timeout(self.refresh_interval, inbox.next()).await {
Ok(Some(mut m)) => match *m.message() {
MatrixCommand::ApplyAsciiChar(c) => self.matrix.apply(c.to_frame()),
MatrixCommand::ApplyFrame(f) => self.matrix.apply(f.to_frame()),
MatrixCommand::ApplyText(s, effect, duration) => {
- let mut animation: Animation<'m, COLS, ROWS> =
- Animation::new(AnimationData::Bytes(s.as_bytes()), effect, duration)
+ let mut animation: Animation<'_, COLS, ROWS> = Animation::new(
+ AnimationData::Bytes(s.as_bytes()),
+ effect,
+ duration,
+ )
.unwrap();
loop {
match animation.next(Instant::now()) {
@@ -149,6 +153,7 @@ where
}
}
}
+}
#[derive(Clone, Copy)]
pub enum MatrixCommand<'m, const XSIZE: usize, const YSIZE: usize> {
