Skip to content

Commit

Permalink
use Result::map_or for bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Dec 21, 2019
1 parent c64eecf commit f3d7e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/util.rs
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 f3d7e03

Please sign in to comment.