Clippy/fmt #48
Annotations
5 errors and 17 warnings
casting `usize` to `u16` may truncate the value:
src/widget/dots.rs#L241
error: casting `usize` to `u16` may truncate the value
--> src/widget/dots.rs:241:38
|
241 | ... shell.publish((self.on_click)(i as u16));
| ^^^^^^^^
|
= help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ...
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation
= note: `#[deny(clippy::cast_possible_truncation)]` implied by `#[deny(clippy::pedantic)]`
help: ... or use `try_from` and handle the error accordingly
|
241 | shell.publish((self.on_click)(u16::try_from(i)));
| ~~~~~~~~~~~~~~~~
|
casting `u16` to `i16` may wrap around the value:
src/view/overview.rs#L120
error: casting `u16` to `i16` may wrap around the value
--> src/view/overview.rs:120:29
|
120 | character.base_size = (val as i16
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_wrap
= note: `#[deny(clippy::cast_possible_wrap)]` implied by `#[deny(clippy::pedantic)]`
|
casting `i16` to `u16` may lose the sign of the value:
src/view/overview.rs#L120
error: casting `i16` to `u16` may lose the sign of the value
--> src/view/overview.rs:120:28
|
120 | character.base_size = (val as i16
| ___________________________________________^
121 | | - character.get_modifier(Trait::DerivedTrait(DerivedTrait::Size)))
122 | | as u16;
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss
note: the lint level is defined here
--> src/main.rs:2:9
|
2 | #![deny(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::cast_sign_loss)]` implied by `#[deny(clippy::pedantic)]`
|
check
Clippy had exited with the 101 exit code
|
test
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
usage of an `Arc` that is not `Send` and `Sync`:
src/i18n.rs#L76
warning: usage of an `Arc` that is not `Send` and `Sync`
--> src/i18n.rs:76:3
|
76 | Arc::new(DefaultLocalizer::new(&*LANGUAGE_LOADER, &Localizations));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `Arc<DefaultLocalizer<'_>>` is not `Send` and `Sync` as `DefaultLocalizer<'_>` is neither `Send` nor `Sync`
= help: if the `Arc` will not used be across threads replace it with an `Rc`
= help: otherwise make `DefaultLocalizer<'_>` `Send` and `Sync` or consider a wrapper type such as `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
this `if` has identical blocks:
src/component/traits.rs#L98
warning: this `if` has identical blocks
--> src/component/traits.rs:98:45
|
98 | let alternate_xp = if self.traits.alt_opt {
| ___________________________________________________^
99 | | row![]
100 | | } else {
| |_________^
|
note: same as this
--> src/component/traits.rs:100:10
|
100 | } else {
| ________________^
101 | | row![
102 | | // text(format!(
103 | | // "{}: {}",
... |
107 | | ]
108 | | };
| |_________^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: `#[warn(clippy::if_same_then_else)]` on by default
|
fields `alternate_beats`, `alternate_experience`, and `splat` are never read:
src/component/traits.rs#L16
warning: fields `alternate_beats`, `alternate_experience`, and `splat` are never read
--> src/component/traits.rs:16:2
|
9 | struct Traits {
| ------ fields in this struct
...
16 | alternate_beats: u16,
| ^^^^^^^^^^^^^^^
17 | alternate_experience: u16,
| ^^^^^^^^^^^^^^^^^^^^
...
21 | splat: String,
| ^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `renderer`:
src/widget/track.rs#L74
warning: unused variable: `renderer`
--> src/widget/track.rs:74:3
|
74 | renderer: &Renderer,
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_renderer`
|
unused variable: `tree`:
src/widget/track.rs#L73
warning: unused variable: `tree`
--> src/widget/track.rs:73:3
|
73 | tree: &mut widget::Tree,
| ^^^^ help: if this is intentional, prefix it with an underscore: `_tree`
|
= note: `#[warn(unused_variables)]` on by default
|
check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
check
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/toolchain@v1, actions-rs/cargo@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
check
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/
|
check
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/
|
check
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/
|
check
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/
|
test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
test
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
test
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/
|
test
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/
|
test
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/
|
test
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/
|