* added serialization #29
clippy-converter
5 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 5 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.75.0-nightly (31bc7e2c4 2023-10-30)
- cargo 1.75.0-nightly (708383d62 2023-10-27)
- clippy 0.1.75 (31bc7e2 2023-10-30)
Annotations
Check warning on line 34 in src/main.rs
github-actions / clippy-converter
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
--> src/main.rs:34:22
|
34 | fn output_path(path: &PathBuf) -> String {
| ^^^^^^^^ help: change this to: `&Path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
Check warning on line 98 in src/image.rs
github-actions / clippy-converter
using `clone` on type `VGAChar` which implements the `Copy` trait
warning: using `clone` on type `VGAChar` which implements the `Copy` trait
--> src/image.rs:98:9
|
98 | best_char.clone()
| ^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*best_char`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
Check warning on line 95 in src/image.rs
github-actions / clippy-converter
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> src/image.rs:89:13
|
89 | / match difference {
90 | | Some(difference) => {
91 | | min_difference = difference;
92 | | best_char = &VGACHAR_LOOKUP[possibility as usize].0;
93 | | }
94 | | None => (),
95 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
89 ~ if let Some(difference) = difference {
90 + min_difference = difference;
91 + best_char = &VGACHAR_LOOKUP[possibility as usize].0;
92 + }
|
Check warning on line 36 in src/image.rs
github-actions / clippy-converter
the loop variable `x` is used to index `chars`
warning: the loop variable `x` is used to index `chars`
--> src/image.rs:36:22
|
36 | for x in 0..VGA_CHAR_WIDTH {
| ^^^^^^^^^^^^^^^^^
|
= 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()
|
36 | for (x, <item>) in chars.iter_mut().enumerate().take(VGA_CHAR_WIDTH) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Check warning on line 27 in src/image.rs
github-actions / clippy-converter
useless conversion to the same type: `image::ImageBuffer<image::Rgb<u8>, std::vec::Vec<u8>>`
warning: useless conversion to the same type: `image::ImageBuffer<image::Rgb<u8>, std::vec::Vec<u8>>`
--> src/image.rs:21:20
|
21 | image: resize(
| ____________________^
22 | | &image,
23 | | VGA_PIXEL_WIDTH,
24 | | VGA_PIXEL_HEIGHT,
25 | | FilterType::Triangle,
26 | | )
27 | | .into(),
| |___________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
help: consider removing `.into()`
|
21 ~ image: resize(
22 + &image,
23 + VGA_PIXEL_WIDTH,
24 + VGA_PIXEL_HEIGHT,
25 + FilterType::Triangle,
26 ~ ),
|