Skip to content

Commit 2e15992

Browse files
authored
Merge pull request #433 from dtolnay/clippy
Run clippy on test suite in CI
2 parents 7c5ce68 + 7a0b134 commit 2e15992

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ jobs:
9292
steps:
9393
- uses: actions/checkout@v2
9494
- uses: dtolnay/rust-toolchain@clippy
95-
- run: cargo clippy --workspace -- -Dclippy::all
95+
- run: cargo clippy --workspace --tests -- -Dclippy::all

gen/lib/tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ fn test_positive() {
1616
};
1717
let opt = Opt::default();
1818
let code = cxx_gen::generate_header_and_cc(rs, &opt).unwrap();
19-
assert!(code.header.len() > 0);
20-
assert!(code.implementation.len() > 0);
19+
assert!(!code.header.is_empty());
20+
assert!(!code.implementation.is_empty());
2121
}
2222

2323
#[test]

tests/cxx_gen.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::field_reassign_with_default)]
2+
13
use cxx_gen::{generate_header_and_cc, Opt};
24
use std::str;
35

tests/test.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::assertions_on_constants, clippy::float_cmp, clippy::unit_cmp)]
2+
13
use cxx_test_suite::extra::ffi2;
24
use cxx_test_suite::ffi;
35
use std::cell::Cell;

0 commit comments

Comments
 (0)