From de8c461a7b18e7924244a0bf40495aea049820fc Mon Sep 17 00:00:00 2001 From: Mark Date: Wed, 29 Mar 2023 19:03:53 -0700 Subject: [PATCH] Improved printing --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8aa1e3e..51e4bf2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -107,12 +107,13 @@ fn main() -> Result<(), std::io::Error> { )?; match g { - Ok(Token::Number(v)) => { + Ok(q) => { write!( - stdout, "\n {}{}={} {v}{}\r\n\n", + stdout, "\n {}{}={} {}{}\r\n\n", style::Bold, color::Fg(color::Green), style::Reset, + q.print(), color::Fg(color::Reset) )?; }, @@ -126,7 +127,6 @@ fn main() -> Result<(), std::io::Error> { color::Fg(color::Reset), )?; } - _ => panic!() } },