move rust to root, make a separate main example, start using iterator
This commit is contained in:
11
examples/main.rs
Normal file
11
examples/main.rs
Normal 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(())
|
||||
}
|
||||
Reference in New Issue
Block a user