Skip to content

Commit ecd9b4f

Browse files
committed
Run rustfmt
1 parent 8c6aedc commit ecd9b4f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

bindgen/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ pub const DEFAULT_ANON_FIELDS_PREFIX: &str = "__bindgen_anon_";
9696
const DEFAULT_NON_EXTERN_FNS_SUFFIX: &str = "__extern";
9797

9898
fn file_is_cpp(name_file: &str) -> bool {
99-
name_file.ends_with(".hpp")
100-
|| name_file.ends_with(".hxx")
101-
|| name_file.ends_with(".hh")
102-
|| name_file.ends_with(".h++")
99+
name_file.ends_with(".hpp") ||
100+
name_file.ends_with(".hxx") ||
101+
name_file.ends_with(".hh") ||
102+
name_file.ends_with(".h++")
103103
}
104104

105105
fn args_are_cpp(clang_args: &[String]) -> bool {
@@ -427,8 +427,8 @@ impl Builder {
427427
// FIXME(emilio): This is a bit hacky, maybe we should stop re-using the
428428
// RustFeatures to store the "disable_untagged_union" call, and make it
429429
// a different flag that we check elsewhere / in generate().
430-
if !rust_features.untagged_union
431-
&& RustFeatures::from(*rust_target).untagged_union
430+
if !rust_features.untagged_union &&
431+
RustFeatures::from(*rust_target).untagged_union
432432
{
433433
output_vector.push("--disable-untagged-union".into());
434434
}
@@ -2654,8 +2654,8 @@ fn rust_to_clang_target(rust_target: &str) -> String {
26542654
rust_target.strip_suffix("-espidf").unwrap().to_owned();
26552655
clang_target.push_str("-elf");
26562656
if clang_target.starts_with("riscv32imc-") {
2657-
clang_target = "riscv32-".to_owned()
2658-
+ clang_target.strip_prefix("riscv32imc-").unwrap();
2657+
clang_target = "riscv32-".to_owned() +
2658+
clang_target.strip_prefix("riscv32imc-").unwrap();
26592659
}
26602660
return clang_target;
26612661
}
@@ -2750,8 +2750,8 @@ impl Bindings {
27502750
return false;
27512751
}
27522752

2753-
if arg.starts_with("-I")
2754-
|| arg.starts_with("--include-directory=")
2753+
if arg.starts_with("-I") ||
2754+
arg.starts_with("--include-directory=")
27552755
{
27562756
return false;
27572757
}
@@ -2778,8 +2778,8 @@ impl Bindings {
27782778
debug!("Found clang: {:?}", clang);
27792779

27802780
// Whether we are working with C or C++ inputs.
2781-
let is_cpp = args_are_cpp(&options.clang_args)
2782-
|| options.input_headers.iter().any(|h| file_is_cpp(h));
2781+
let is_cpp = args_are_cpp(&options.clang_args) ||
2782+
options.input_headers.iter().any(|h| file_is_cpp(h));
27832783

27842784
let search_paths = if is_cpp {
27852785
clang.cpp_search_paths

0 commit comments

Comments
 (0)