diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-21 19:07:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-21 19:07:44 +0100 |
| commit | 7d297044d7bdf6aea95bbd62fbde783562f1b106 (patch) | |
| tree | 81f528e97c17efd4bf092de25e0e8865860c6a66 /src/bootstrap | |
| parent | 5a0f17e849237985ce8afe8da8bf0dcae678825e (diff) | |
| parent | f3d7e034725c932d87ddab036472514912077cec (diff) | |
| download | rust-7d297044d7bdf6aea95bbd62fbde783562f1b106.tar.gz rust-7d297044d7bdf6aea95bbd62fbde783562f1b106.zip | |
Rollup merge of #67491 - lzutao:res-map-or, r=Mark-Simulacrum
use Result::map_or for bootstrap
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/util.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs index 6824b7a58c4..085742b011c 100644 --- a/src/bootstrap/util.rs +++ b/src/bootstrap/util.rs @@ -270,9 +270,9 @@ pub enum CiEnv { impl CiEnv { /// Obtains the current CI environment. pub fn current() -> CiEnv { - if env::var("TF_BUILD").ok().map_or(false, |e| &*e == "True") { + if env::var("TF_BUILD").map_or(false, |e| e == "True") { CiEnv::AzurePipelines - } else if env::var("GITHUB_ACTIONS").ok().map_or(false, |e| &*e == "true") { + } else if env::var("GITHUB_ACTIONS").map_or(false, |e| e == "true") { CiEnv::GitHubActions } else { CiEnv::None |
