capture des arguments depuis l'appel de fonction

This commit is contained in:
2026-07-06 01:14:24 +02:00
parent 268d773bf9
commit 39abaca4e0
2 changed files with 10 additions and 8 deletions

View File

@@ -2,7 +2,9 @@
use std::env;
pub fn arguments() -> Vec<String> {
let mut pipicaca = Vec::new();
pipicaca.push("popo");
pipicaca
let mut args_to_process = Vec::new();
for argument in env::args() {
args_to_process.push(argument);
}
args_to_process
}

View File

@@ -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!");
}