diff --git a/parser/src/main.rs b/parser/src/main.rs index dd3fb00..7f244e2 100644 --- a/parser/src/main.rs +++ b/parser/src/main.rs @@ -1,9 +1,5 @@ #![allow(non_snake_case)] -use std::{ - ascii::AsciiExt, - fs, - io::{BufRead, Write}, -}; +use std::{fs, io::Write}; #[macro_use] extern crate scan_fmt; use csv::Writer; @@ -54,7 +50,7 @@ fn main() { let mut outfile = fs::File::create("../compiled.csv").unwrap(); - outfile.write(data.as_bytes()).unwrap(); + outfile.write_all(data.as_bytes()).unwrap(); } fn parse_props(infile: Vec) -> Properties { @@ -93,7 +89,7 @@ fn parse_props(infile: Vec) -> Properties { let Izy = scan_fmt!(&infile[32], "Izy {}", f64).unwrap(); let Izz = scan_fmt!(&infile[33], "Izz {}", f64).unwrap(); - return Properties { + Properties { part_number, part_name, material_name, @@ -116,5 +112,5 @@ fn parse_props(infile: Vec) -> Properties { Izx, Izy, Izz, - }; + } }