diff --git a/src/get.rs b/src/get.rs index 4cfec2c..120ffcb 100644 --- a/src/get.rs +++ b/src/get.rs @@ -1,8 +1,10 @@ // recupere les arguments passes entree de l'appel du programme use std::env; -pub fn arguments() -> Vec { - let mut pipicaca = Vec::new(); - pipicaca.push("popo"); - pipicaca -} \ No newline at end of file +pub fn arguments() -> Vec { + let mut args_to_process = Vec::new(); + for argument in env::args() { + args_to_process.push(argument); + } + args_to_process +} diff --git a/src/main.rs b/src/main.rs index 27f95db..a4acc16 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,11 +1,11 @@ // boucle principale +pub mod display; pub mod get; pub mod parse; -pub mod display; fn main() { - get::arguments(); - parse::arguments(); + let args_to_process = get::arguments(); + parse::arguments(args_to_process); display::result(); println!("Hello, world!"); }