Skip to content

Commit

Permalink
fmt code
Browse files Browse the repository at this point in the history
  • Loading branch information
LuuuXXX committed Oct 18, 2023
1 parent 4bd13aa commit 7bd8b96
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2099,23 +2099,28 @@ impl Config {
Some(commit.to_string())
}

fn parse_download_ci_llvm(&self, download_ci_llvm: Option<StringOrBool>, asserts: bool) -> bool {
fn parse_download_ci_llvm(
&self,
download_ci_llvm: Option<StringOrBool>,
asserts: bool,
) -> bool {
match download_ci_llvm {
None => {
self.channel == "dev" && llvm::is_ci_llvm_available(&self, asserts)
},
None => self.channel == "dev" && llvm::is_ci_llvm_available(&self, asserts),
Some(StringOrBool::Bool(b)) => b,
Some(StringOrBool::String(s)) if s == "if-available" => {
llvm::is_ci_llvm_available(&self, asserts)
},
}
Some(StringOrBool::String(s)) if s == "if-unchanged" => {
if self.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true).is_none() {
if self
.last_modified_commit(&["src/llvm-project"], "download-ci-llvm", true)
.is_none()
{
// there are some untracked changes in the the given paths.
false
} else {
llvm::is_ci_llvm_available(&self, asserts)
}
},
}
Some(StringOrBool::String(other)) => {
panic!("unrecognized option for download-ci-llvm: {:?}", other)
}
Expand Down

0 comments on commit 7bd8b96

Please sign in to comment.