no terrible cloning!

This commit is contained in:
nora 2022-06-21 13:46:51 +02:00
parent 7fc10f3b6c
commit d12fa25df9
8 changed files with 63 additions and 96 deletions

View file

@ -1,3 +1,10 @@
fn main() {
println!("Hello, world!");
use std::error::Error;
fn main() -> Result<(), Box<dyn Error>> {
let input_file = std::env::args().nth(1).expect("first argument");
let src = std::fs::read_to_string(input_file)?;
parser::parse_file(src);
Ok(())
}