From 8723af81bac8c0104f3d5bbbeff608863da48495 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 9 Dec 2024 20:52:14 +0100 Subject: [PATCH] Prepare for follow-on change --- experiments/2024-12-09/src/render/text.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/experiments/2024-12-09/src/render/text.rs b/experiments/2024-12-09/src/render/text.rs index 0f5d1e09c..b375e34ef 100644 --- a/experiments/2024-12-09/src/render/text.rs +++ b/experiments/2024-12-09/src/render/text.rs @@ -1,3 +1,5 @@ +use std::fmt::Write; + use crate::ui::OpsUi; pub struct TextRenderer { @@ -83,7 +85,8 @@ impl TextRenderer { attrs = attrs.color(glyphon::Color::rgb(0, 127, 0)); } - let line = format!("{op}"); + let mut line = String::new(); + write!(line, "{op}")?; buffer.lines.push(glyphon::BufferLine::new( line,