From d5083f4cce47567644fd1b2c5923e5d0dcd98d44 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 7 Mar 2021 10:17:40 -0700 Subject: don't round-trip everything through strings!!! --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 6bf920b..8617d6a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,4 @@ +use std::convert::TryInto; use std::time::Duration; use minifb::{Key, Window, WindowOptions, MouseMode}; @@ -119,7 +120,7 @@ fn main() { let u32_data: Vec = data.into_iter() .map(|x| { if let actor::Value::Number(x) = x { - format!("{}", x).parse().unwrap() + x.try_into().unwrap() } else { panic!("bruh") } -- cgit v1.2.3