We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a47877e commit 221fd61Copy full SHA for 221fd61
build.rs
@@ -3,11 +3,8 @@ use std::env;
3
include!("src/dist/triple.rs");
4
5
fn from_build() -> Result<PartialTargetTriple, String> {
6
- let triple = if let Ok(triple) = env::var("RUSTUP_OVERRIDE_BUILD_TRIPLE") {
7
- triple
8
- } else {
9
- env::var("TARGET").unwrap()
10
- };
+ let triple =
+ env::var("RUSTUP_OVERRIDE_BUILD_TRIPLE").unwrap_or_else(|_| env::var("TARGET").unwrap());
11
PartialTargetTriple::new(&triple).ok_or(triple)
12
}
13
0 commit comments