X-Git-Url: https://i11git.iti.kit.edu/anon-gitweb/?p=Mitarbeiter%2FTim-Zeitz%2Fstud-rust-base.git;a=blobdiff_plain;f=src%2Fbin%2Fexample.rs;h=667bff3933bf0c34658a6be642cf535e9933a067;hp=68056b8c014bc0c2b99f80a884472ac977b31fcb;hb=7e14e0703289af36efa95d687c71116a7a53a450;hpb=00434ae3ce1778ea5709d9267dcd37e52c2f4fa0 diff --git a/src/bin/example.rs b/src/bin/example.rs index 68056b8..667bff3 100644 --- a/src/bin/example.rs +++ b/src/bin/example.rs @@ -3,10 +3,7 @@ use stud_rust_base::{io::*, time::report_time, types::*}; use std::{env, error::Error, path::Path}; fn main() -> Result<(), Box> { - let mut args = env::args(); - args.next(); - - let arg = &args.next().expect("No directory arg given"); + let arg = &env::args().skip(1).next().expect("No directory arg given"); let path = Path::new(arg); let first_out = Vec::::load_from(path.join("first_out"))?;