capture des arguments depuis l'appel de fonction
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -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!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user