From 27a1fdbe4eefef66531ae0f4243c4baea2903f42 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 21 Oct 2023 10:23:44 +0200 Subject: Add structure to monitor arg:value for a register --- src/ui.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ui.rs') diff --git a/src/ui.rs b/src/ui.rs index f846349..92e2a04 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -34,8 +34,11 @@ impl UI { self.max_lines = self.lines.len() + 1; } - pub fn get_paragraph(&self, pid: Pid) -> Paragraph { - let lines: Vec = self.lines.iter().map(|x| x.output_ui(pid)).collect(); + pub fn get_paragraph(&mut self, pid: Pid) -> Paragraph { + let mut lines: Vec = vec![]; + for line in &mut self.lines { + lines.push(line.output_ui(pid)); + } let paragraph = Paragraph::new(lines) .block( Block::default() -- cgit v1.2.3-18-g5258