Skip to content

Commit 5d01ffd

Browse files
committed
chore: fix new clippy lints
1 parent a3f877b commit 5d01ffd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

bindgen-tests/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn main() {
2323

2424
for entry in entries {
2525
// TODO: file_is_cpp() in bindgen/lib.rs checks for hpp,hxx,hh, and h++ - should this be consistent?
26-
if entry.path().extension().map_or(false, |ext| {
26+
if entry.path().extension().is_some_and(|ext| {
2727
ext.eq_ignore_ascii_case("h") || ext.eq_ignore_ascii_case("hpp")
2828
}) {
2929
let func = entry

bindgen/ir/dot.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ where
4141
if is_allowlisted { "black" } else { "gray" }
4242
)?;
4343
item.dot_attributes(ctx, &mut dot_file)?;
44-
writeln!(&mut dot_file, r#"</table> >];"#)?;
44+
writeln!(&mut dot_file, "</table> >];")?;
4545

4646
item.trace(
4747
ctx,

bindgen/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pub const DEFAULT_ANON_FIELDS_PREFIX: &str = "__bindgen_anon_";
8686
const DEFAULT_NON_EXTERN_FNS_SUFFIX: &str = "__extern";
8787

8888
fn file_is_cpp(name_file: &str) -> bool {
89-
Path::new(name_file).extension().map_or(false, |ext| {
89+
Path::new(name_file).extension().is_some_and(|ext| {
9090
ext.eq_ignore_ascii_case("hpp") ||
9191
ext.eq_ignore_ascii_case("hxx") ||
9292
ext.eq_ignore_ascii_case("hh") ||

0 commit comments

Comments
 (0)