Skip to content

Commit becfe6b

Browse files
Copilotsamueltardieu
authored andcommitted
chore(clippy): enable new lints
1 parent e462db6 commit becfe6b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ module_name_repetitions = { level = "allow", priority = 1 }
4848
too_long_first_doc_paragraph = { level = "allow", priority = 1 } # Temporary
4949
pedantic = "deny"
5050
missing_const_for_fn = "deny"
51-
# Do not activate until Clippy issue #13356 is fixed
52-
#allow_attributes = "deny"
51+
redundant_clone = "deny"
52+
allow_attributes = "deny"
5353

5454
[[bench]]
5555
name = "algos"

examples/sliding-puzzle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const SIDE: u8 = 3;
1212
const SIDE: u8 = 4;
1313
const LIMIT: usize = (SIDE * SIDE) as usize;
1414

15+
#[expect(clippy::derived_hash_with_manual_eq)]
1516
#[derive(Clone, Debug, Hash)]
16-
#[allow(clippy::derived_hash_with_manual_eq)] // expect doesn't work, clippy issue #13356
1717
struct Game {
1818
positions: [u8; LIMIT], // Correct position of piece at every index
1919
hole_idx: u8, // Current index of the hole

src/directed/bfs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ where
172172
///
173173
/// Find also a more interesting example, comparing regular
174174
/// and bidirectional BFS [here](https://github.com/evenfurther/pathfinding/blob/main/examples/bfs_bidirectional.rs).
175-
#[allow(clippy::missing_panics_doc)]
175+
#[expect(clippy::missing_panics_doc)]
176176
pub fn bfs_bidirectional<'a, N, S, E, FNS, FNP, IN>(
177177
start: S,
178178
end: E,

tests/matrix.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ fn square_rotate() {
169169
let mut m = m1.clone();
170170
m.rotate_ccw(2);
171171
assert_eq!(m, m3);
172-
let mut m = m1.clone();
172+
let mut m = m1;
173173
m.rotate_ccw(3);
174174
assert_eq!(m, m2);
175175

tests/pathfinding.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ mod ex2 {
335335

336336
#[test]
337337
fn bfs_bidirectional_path_ok() {
338-
#[allow(clippy::type_complexity)]
338+
#[expect(clippy::type_complexity)]
339339
static SUCCESSORS: fn(&(usize, usize)) -> Vec<(usize, usize)> =
340340
|n| successors(n).into_iter().map(|(n, _)| n).collect();
341341

@@ -420,7 +420,7 @@ mod ex2 {
420420

421421
#[test]
422422
fn bfs_bidirectional_no_path() {
423-
#[allow(clippy::type_complexity)]
423+
#[expect(clippy::type_complexity)]
424424
static SUCCESSORS: fn(&(usize, usize)) -> Vec<(usize, usize)> =
425425
|n| successors(n).into_iter().map(|(n, _)| n).collect();
426426

0 commit comments

Comments
 (0)