mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
chore: added match block in src/main.rs
This commit is contained in:
committed by
Amanieu d'Antras
parent
c862432cfd
commit
ca67119d5f
@@ -14,8 +14,19 @@ fn main() {
|
||||
let args: Cli = clap::Parser::parse();
|
||||
let processed_cli_options = ProcessedCli::new(args);
|
||||
|
||||
// TODO: put this in a match block to support more architectures
|
||||
let test_environment = ArmTestProcessor::create(processed_cli_options);
|
||||
let test_environment_result = match processed_cli_options.target.as_str() {
|
||||
"aarch64-unknown-linux-gnu"
|
||||
| "armv7-unknown-linux-gnueabihf"
|
||||
| "aarch64_be-unknown-linux-gnu" => Some(ArmTestProcessor::create(processed_cli_options)),
|
||||
|
||||
_ => None,
|
||||
};
|
||||
|
||||
if test_environment_result.is_none() {
|
||||
std::process::exit(0);
|
||||
}
|
||||
|
||||
let test_environment = test_environment_result.unwrap();
|
||||
|
||||
if !test_environment.build_c_file() {
|
||||
std::process::exit(2);
|
||||
|
||||
Reference in New Issue
Block a user