aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2020-02-20 15:08:14 -0700
committerOndřej Čertík <ondrej@certik.us>2020-02-20 15:22:06 -0700
commit8281c302054e479ba4d938971a426721f409ca23 (patch)
treeb89f2a9fbdbe67b839ab6f240e3d784088cfc074 /src/main.rs
parent79b29a17c50d27bb089747a0b1ac23cf62db24c2 (diff)
downloadfpm-8281c302054e479ba4d938971a426721f409ca23.tar.gz
fpm-8281c302054e479ba4d938971a426721f409ca23.zip
Simplify the code
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs
index b3195c7..340c1d3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -68,11 +68,9 @@ add_executable(p1 ../main.f90 {})
};
args.extend(vec!["-B", "build", "."]);
println!("[+] cmake {:?}", args);
- let env_fc = env::var("FC");
- let fc : String = if env_fc.is_err() {
- "gfortran".to_string()
- } else {
- env_fc.unwrap()
+ let fc : String = match env::var("FC") {
+ Ok(val) => val,
+ Err(_) => "gfortran".to_string(),
};
let output = std::process::Command::new("cmake")
.args(&args)