about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2019-12-21 17:04:41 +0000
committerLzu Tao <taolzu@gmail.com>2019-12-21 17:04:41 +0000
commitf3d7e034725c932d87ddab036472514912077cec (patch)
tree0da73dc834e26a4f378bde1d3ba89072d94ead86 /src/bootstrap
parentc64eecf4d0907095928fb36fd3a1dd5fb2d9ff06 (diff)
downloadrust-f3d7e034725c932d87ddab036472514912077cec.tar.gz
rust-f3d7e034725c932d87ddab036472514912077cec.zip
use Result::map_or for bootstrap
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/util.rs4
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