move rust to root, make a separate main example, start using iterator

This commit is contained in:
Alon Levy
2023-12-31 00:19:24 +02:00
parent 44849f5b66
commit 9b2f8d9377
6 changed files with 93 additions and 51 deletions

11
examples/main.rs Normal file
View File

@@ -0,0 +1,11 @@
use thermaldecoder::decode_raw;
use std::env;
fn main() -> anyhow::Result<()> {
let mut arg = env::args();
let filename = arg.next().ok_or(anyhow::anyhow!("unexpected"))?;
let frames = arg.next().unwrap_or("frames".into());
decode_raw(&filename, &frames)?;
Ok(())
}