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; use std::env;
pub fn arguments() -> Vec<String> { pub fn arguments() -> Vec<String> {
let mut pipicaca = Vec::new(); let mut args_to_process = Vec::new();
pipicaca.push("popo"); for argument in env::args() {
pipicaca args_to_process.push(argument);
}
args_to_process
} }

View File

@@ -1,11 +1,11 @@
// boucle principale // boucle principale
pub mod display;
pub mod get; pub mod get;
pub mod parse; pub mod parse;
pub mod display;
fn main() { fn main() {
get::arguments(); let args_to_process = get::arguments();
parse::arguments(); parse::arguments(args_to_process);
display::result(); display::result();
println!("Hello, world!"); println!("Hello, world!");
} }