From f305e9dc3a466d0a93e9b7c9c6c9c46a5479b7bb Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Wed, 24 May 2023 11:50:39 +0300 Subject: [PATCH] fix(client): loop logs, not actions --- client/src/plugins/game/ui/log.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/plugins/game/ui/log.rs b/client/src/plugins/game/ui/log.rs index 958940c..9dcc7e3 100644 --- a/client/src/plugins/game/ui/log.rs +++ b/client/src/plugins/game/ui/log.rs @@ -224,7 +224,7 @@ fn update_log( let index_spaces = status.actions.len().to_string().len(); - for (i, _action) in status.actions.iter().enumerate() { + for (i, log) in status.log.iter().enumerate() { let spaces = " ".repeat(index_spaces - i.to_string().len()); let index_text = TextSection { value: format!("{}{}. ", spaces, i), @@ -235,8 +235,6 @@ fn update_log( }; let mut sections = vec![index_text]; - - let log = status.log.get(i).unwrap(); for section in &log.sections { match section { LogSection::Normal(value) => { -- 2.44.1