Skip to content

Commit

Permalink
Expand Clippy lints to cover tests and conditional features
Browse files Browse the repository at this point in the history
  • Loading branch information
maneatingape committed Sep 10, 2023
1 parent d98f805 commit 24f87c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: cargo fmt --check
- run: cargo clippy -- --deny warnings
- run: cargo clippy --tests --all-features -- --deny warnings
- run: cargo test
4 changes: 2 additions & 2 deletions tests/year2015/day08_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const EXAMPLE: &str = r#"
#[test]
fn part1_test() {
let input = parse(EXAMPLE);
assert_eq!(part1(&input), 12);
assert_eq!(part1(input), 12);
}

#[test]
fn part2_test() {
let input = parse(EXAMPLE);
assert_eq!(part2(&input), 19);
assert_eq!(part2(input), 19);
}
4 changes: 2 additions & 2 deletions tests/year2022/day17_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ const EXAMPLE: &str = ">>><<><>><<<>><>>><<<>>><<<><<<>><>><<>>";
#[test]
fn part1_test() {
let input = parse(EXAMPLE);
assert_eq!(part1(&input), 3068);
assert_eq!(part1(input), 3068);
}

#[test]
fn part2_test() {
let input = parse(EXAMPLE);
assert_eq!(part2(&input), 1514285714288);
assert_eq!(part2(input), 1514285714288);
}

0 comments on commit 24f87c1

Please sign in to comment.