Update Rust crate thiserror to v2 #104
clippy
14 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 14 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.82.0 (f6e511eec 2024-10-15)
- cargo 1.82.0 (8f40fc59f 2024-08-21)
- clippy 0.1.82 (f6e511e 2024-10-15)
Annotations
Check warning on line 36 in src/main.rs
github-actions / clippy
`to_string` applied to a type that implements `Display` in `println!` args
warning: `to_string` applied to a type that implements `Display` in `println!` args
--> src/main.rs:36:36
|
36 | println!("Error: {}", e.to_string());
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
Check warning on line 68 in src/tile.rs
github-actions / clippy
methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
--> src/tile.rs:68:34
|
68 | pub(crate) fn to_test_string(&self) -> String {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
Check warning on line 36 in src/main.rs
github-actions / clippy
`to_string` applied to a type that implements `Display` in `println!` args
warning: `to_string` applied to a type that implements `Display` in `println!` args
--> src/main.rs:36:36
|
36 | println!("Error: {}", e.to_string());
| ^^^^^^^^^^^^ help: remove this
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args
= note: `#[warn(clippy::to_string_in_format_args)]` on by default
Check warning on line 36 in src/importer/sdk.rs
github-actions / clippy
casting to the same type is unnecessary (`char` -> `char`)
warning: casting to the same type is unnecessary (`char` -> `char`)
--> src/importer/sdk.rs:36:27
|
36 | match *tile as char {
| ^^^^^^^^^^^^^ help: try: `{ *tile }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 68 in src/tile.rs
github-actions / clippy
methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value
--> src/tile.rs:68:34
|
68 | pub(crate) fn to_test_string(&self) -> String {
| ^^^^^
|
= help: consider choosing a less ambiguous name
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention
= note: `#[warn(clippy::wrong_self_convention)]` on by default
Check warning on line 51 in src/helpers.rs
github-actions / clippy
the loop variable `i` is used to index `tiles`
warning: the loop variable `i` is used to index `tiles`
--> src/helpers.rs:51:14
|
51 | for i in 0..9 {
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
51 | for (i, <item>) in tiles.iter_mut().enumerate() {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 36 in src/importer/sdk.rs
github-actions / clippy
casting to the same type is unnecessary (`char` -> `char`)
warning: casting to the same type is unnecessary (`char` -> `char`)
--> src/importer/sdk.rs:36:27
|
36 | match *tile as char {
| ^^^^^^^^^^^^^ help: try: `{ *tile }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 13 in src/helpers.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/helpers.rs:13:16
|
13 | File::open(&path).map_err(|_| SudokuError::FileRead(filename.to_string()))
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
Check warning on line 51 in src/helpers.rs
github-actions / clippy
the loop variable `i` is used to index `tiles`
warning: the loop variable `i` is used to index `tiles`
--> src/helpers.rs:51:14
|
51 | for i in 0..9 {
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
51 | for (i, <item>) in tiles.iter_mut().enumerate() {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 13 in src/helpers.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/helpers.rs:13:16
|
13 | File::open(&path).map_err(|_| SudokuError::FileRead(filename.to_string()))
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
Check warning on line 90 in src/board.rs
github-actions / clippy
it looks like you're manually copying between slices
warning: it looks like you're manually copying between slices
--> src/board.rs:88:17
|
88 | / for y in 0..9 {
89 | | tiles[y] = self.grid[row as usize][y];
90 | | }
| |_________________^ help: try replacing the loop by: `tiles.copy_from_slice(&self.grid[row as usize]);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy
= note: `#[warn(clippy::manual_memcpy)]` on by default
Check warning on line 90 in src/board.rs
github-actions / clippy
it looks like you're manually copying between slices
warning: it looks like you're manually copying between slices
--> src/board.rs:88:17
|
88 | / for y in 0..9 {
89 | | tiles[y] = self.grid[row as usize][y];
90 | | }
| |_________________^ help: try replacing the loop by: `tiles.copy_from_slice(&self.grid[row as usize]);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_memcpy
= note: `#[warn(clippy::manual_memcpy)]` on by default
Check warning on line 83 in src/board.rs
github-actions / clippy
the loop variable `x` is used to index `tiles`
warning: the loop variable `x` is used to index `tiles`
--> src/board.rs:83:26
|
83 | for x in 0..9 {
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
|
83 | for (x, <item>) in tiles.iter_mut().enumerate() {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 83 in src/board.rs
github-actions / clippy
the loop variable `x` is used to index `tiles`
warning: the loop variable `x` is used to index `tiles`
--> src/board.rs:83:26
|
83 | for x in 0..9 {
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator and enumerate()
|
83 | for (x, <item>) in tiles.iter_mut().enumerate() {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~