Skip to content

Update Main.yml

Update Main.yml #27

Triggered via push October 5, 2023 17:21
Status Success
Total duration 2m 57s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

Main.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

16 warnings
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: src/main.rs#L34
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
using `clone` on type `VGAChar` which implements the `Copy` trait: src/image.rs#L98
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
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: src/image.rs#L89
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 + } |
the loop variable `x` is used to index `chars`: src/image.rs#L36
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) { | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
useless conversion to the same type: `image::ImageBuffer<image::Rgb<u8>, std::vec::Vec<u8>>`: src/image.rs#L21
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 ~ ), |
empty `loop {}` wastes CPU cycles: src/main.rs#L9
warning: empty `loop {}` wastes CPU cycles --> src/main.rs:9:5 | 9 | loop {}; | ^^^^^^^ | = help: you should either use `panic!()` or add a call pausing or sleeping the thread to the loop body = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_loop = note: `#[warn(clippy::empty_loop)]` on by default
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/[email protected]. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
image_comparison
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
image_comparison
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
image_comparison
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
image_comparison
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
image_comparison
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/