Skip to content

Commit 08c807e

Browse files
committed
Fix Clippy warnings
1 parent e9d5955 commit 08c807e

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/problem_0048_rotate_image/reverse_then_transpose.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ impl Solution {
1212
for row_plus_1 in 1..n {
1313
let row = row_plus_1 - 1;
1414

15+
#[expect(clippy::needless_range_loop, reason = "false positive")]
1516
for column in row_plus_1..n {
1617
let temp = matrix[row][column];
1718

src/problem_1203_sort_items_by_groups_respecting_dependencies/topological_sorting.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@ pub struct Solution;
44

55
use std::{iter, mem};
66

7+
#[derive(Default)]
78
enum State {
9+
#[default]
810
NotVisited,
911
Visiting,
1012
Visited,
1113
}
1214

13-
impl Default for State {
14-
fn default() -> Self {
15-
Self::NotVisited
16-
}
17-
}
18-
1915
impl Solution {
2016
fn dfs(graph: &[Vec<i32>], node: usize, states: &mut [State], result: &mut Vec<i32>) -> bool {
2117
for &dependency in &graph[node] {

0 commit comments

Comments
 (0)