diff options
| author | Lzu Tao <taolzu@gmail.com> | 2019-12-21 17:04:41 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2019-12-21 17:04:41 +0000 |
| commit | f3d7e034725c932d87ddab036472514912077cec (patch) | |
| tree | 0da73dc834e26a4f378bde1d3ba89072d94ead86 /src/bootstrap | |
| parent | c64eecf4d0907095928fb36fd3a1dd5fb2d9ff06 (diff) | |
| download | rust-f3d7e034725c932d87ddab036472514912077cec.tar.gz rust-f3d7e034725c932d87ddab036472514912077cec.zip | |
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 |
