Text displays: an Align enum, and the text shared rather than copied

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-25 06:12:31 +01:00
parent dc1e16f472
commit 76408b734e
2 changed files with 22 additions and 9 deletions
@@ -21,7 +21,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
display.apply(&packet.values);
let mut state = serde_json::to_value(&display)?;
state["text"] = display.text.plain().into();
state["alignment"] = display.alignment().into();
state["alignment"] = format!("{:?}", display.align()).to_uppercase().into();
writeln!(out, "{}", state)?;
}
Ok(())