Skip to content

Commit fbe6f33

Browse files
committed
Fix formatting
1 parent 17cca4c commit fbe6f33

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

cobalt-llvm/build.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ fn locate_llvm_config() -> Option<PathBuf> {
7373
for binary_name in llvm_config_binary_names() {
7474
let binary_name = prefix.join(binary_name);
7575
match llvm_version(&binary_name) {
76-
Ok(ref version) => if is_compatible_llvm(version) {
77-
// Compatible version found. Nice.
78-
return Some(binary_name);
76+
Ok(ref version) => {
77+
if is_compatible_llvm(version) {
78+
// Compatible version found. Nice.
79+
return Some(binary_name);
80+
}
7981
}
8082
Err(ref e) if e.kind() == ErrorKind::NotFound => {
8183
// Looks like we failed to execute any llvm-config. Keep
@@ -165,13 +167,15 @@ fn is_compatible_llvm(llvm_version: &Version) -> bool {
165167

166168
let strict =
167169
env::var_os(ENV_STRICT_VERSIONING).is_some() || cfg!(feature = "strict-versioning");
168-
if let Some(v) = env::var(ENV_STRICT_VERSIONING).ok().and_then(|v| Version::parse(&v).ok()) {
170+
if let Some(v) = env::var(ENV_STRICT_VERSIONING)
171+
.ok()
172+
.and_then(|v| Version::parse(&v).ok())
173+
{
169174
llvm_version == &v || {
170175
println!("Found LLVM {llvm_version}, but need exactly {v}");
171176
false
172177
}
173-
}
174-
else if strict {
178+
} else if strict {
175179
(llvm_version.major == 16 && llvm_version.minor == 0) || {
176180
println!("Found LLVM {llvm_version}, but need 16.0.x");
177181
false

0 commit comments

Comments
 (0)