aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-07 10:17:40 -0700
committerMelody Horn <melody@boringcactus.com>2021-03-07 10:17:40 -0700
commitd5083f4cce47567644fd1b2c5923e5d0dcd98d44 (patch)
treeca625bf36a221bef5fd66cec7fb793a36ebad56b /src/main.rs
parentc8cfeabc011bfabb6303023a969155ded926d95c (diff)
downloadhope-d5083f4cce47567644fd1b2c5923e5d0dcd98d44.tar.gz
hope-d5083f4cce47567644fd1b2c5923e5d0dcd98d44.zip
don't round-trip everything through strings!!!
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
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<u32> = data.into_iter()
.map(|x| {
if let actor::Value::Number(x) = x {
- format!("{}", x).parse().unwrap()
+ x.try_into().unwrap()
} else {
panic!("bruh")
}