Skip to content

Commit 75d4f1a

Browse files
committed
chore: fix new clippy lints, enforce in CI
1 parent a3f877b commit 75d4f1a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/bindgen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: cargo fmt -- --check
3131

3232
- name: Run clippy
33-
run: cargo clippy --all-targets --workspace --exclude bindgen-integration --exclude tests_expectations
33+
run: cargo clippy --all-targets --workspace --exclude bindgen-integration --exclude tests_expectations -- -D warnings
3434

3535
msrv:
3636
runs-on: ubuntu-latest

bindgen-tests/build.rs

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

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, "</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") ||

0 commit comments

Comments
 (0)