Skip to content

Commit

Permalink
Rollup merge of rust-lang#67491 - lzutao:res-map-or, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
use Result::map_or for bootstrap
  • Loading branch information
Centril authored Dec 21, 2019
2 parents 9f89179 + f3d7e03 commit eef3fbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eef3fbd

Please sign in to comment.