Skip to content

Commit 8ce3503

Browse files
committed
fix: cli tool and some clippy warnings
1 parent 3f811a2 commit 8ce3503

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

bindgen/ir/dot.rs

Lines changed: 1 addition & 1 deletion
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, r"</table> >];")?;
4545

4646
item.trace(
4747
ctx,

bindgen/lib.rs

Lines changed: 1 addition & 1 deletion
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") ||

bindgen/options/cli.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::{
77
TypeKind,
88
},
99
features::{RustEdition, EARLIEST_STABLE_RUST},
10+
ir::function::FunctionKind,
1011
regex_set::RegexSet,
1112
Abi, AliasVariation, Builder, CodegenConfig, EnumVariation,
1213
FieldVisibilityKind, Formatter, MacroTypeVariation, NonCopyUnionStyle,
@@ -767,7 +768,7 @@ where
767768
Some(AttributeItemKind::Union) => {
768769
"--with-attribute-custom-union"
769770
}
770-
Some(AttributeItemKind::Function) => {
771+
Some(AttributeItemKind::Function(_)) => {
771772
"--with-attribute-custom-function"
772773
}
773774
};
@@ -1037,7 +1038,7 @@ where
10371038
),
10381039
(
10391040
with_attribute_custom_function,
1040-
Some(AttributeItemKind::Function),
1041+
Some(AttributeItemKind::Function(FunctionKind::Function)),
10411042
"--with-attribute-custom-function",
10421043
),
10431044
] {

0 commit comments

Comments
 (0)