Skip to content

Commit

Permalink
nicer fmt by cfg! expr
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Sep 8, 2024
1 parent 400e033 commit 04d000e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions sdl2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,15 +555,11 @@ fn main() {

#[cfg(feature = "bindgen")]
{
let include_paths: Vec<String>;
#[cfg(feature = "bundled")]
{
include_paths = vec![sdl2_includes];
}
#[cfg(not(feature = "bundled"))]
{
include_paths = compute_include_paths(sdl2_includes)
}
let include_paths: Vec<String> = if cfg!(feature = "bundled") {
vec![sdl2_includes]
} else {
compute_include_paths(sdl2_includes)
};
generate_bindings(target.as_str(), host.as_str(), include_paths.as_slice());
println!("cargo:include={}", include_paths.join(":"));
}
Expand Down

0 comments on commit 04d000e

Please sign in to comment.