Update to latest iced (1/2) #39
Annotations
7 errors and 32 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#L283
error: casting `u16` to `i16` may wrap around the value
--> src/view/overview.rs:283:29
|
283 | character.base_size = (val as i16 - character.get_modifier(Trait::Size)) as u16;
| ^^^^^^^^^^
|
= 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#L283
error: casting `i16` to `u16` may lose the sign of the value
--> src/view/overview.rs:283:28
|
283 | character.base_size = (val as i16 - character.get_modifier(Trait::Size)) as u16;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss
= note: `#[deny(clippy::cast_sign_loss)]` implied by `#[deny(clippy::pedantic)]`
|
unnecessary boolean `not` operation:
src/component/skills.rs#L122
error: unnecessary boolean `not` operation
--> src/component/skills.rs:122:6
|
122 | / if !specialties.is_empty() {
123 | | theme::Text::Color(Color::from_rgb(0.0, 0.7, 0.0))
124 | | } else {
125 | | theme::Text::Default
126 | | },
| |_____________________^
|
= help: remove the `!` and swap the blocks of the `if`/`else`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
note: the lint level is defined here
--> src/main.rs:2:9
|
2 | #![deny(clippy::pedantic)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::if_not_else)]` implied by `#[deny(clippy::pedantic)]`
|
redundant redefinition of a binding `skill`:
src/component/skills.rs#L104
error: redundant redefinition of a binding `skill`
--> src/component/skills.rs:104:8
|
104 | ... let skill = skill;
| ^^^^^^^^^^^^^^^^^^
|
help: `skill` is initially defined here
--> src/component/skills.rs:93:7
|
93 | for skill in Skill::get(cat) {
| ^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_locals
= note: `#[deny(clippy::redundant_locals)]` on by default
|
check
Clippy had exited with the 101 exit code
|
test
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
struct update has no effect, all the fields in the struct have already been specified:
src/main.rs#L622
warning: struct update has no effect, all the fields in the struct have already been specified
--> src/main.rs:622:7
|
622 | ..Default::default()
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_update
= note: `#[warn(clippy::needless_update)]` on by default
|
using `map` over `inspect`:
src/main.rs#L118
warning: using `map` over `inspect`
--> src/main.rs:118:5
|
118 | .map(|val| {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
118 ~ .inspect(|val| {
119 ~ val.calc_mod_map();
|
|
redundant pattern matching, consider using `is_some()`:
src/widget/track.rs#L151
warning: redundant pattern matching, consider using `is_some()`
--> src/widget/track.rs:151:13
|
151 | if let Some(_) = cursor.position_over(layout.bounds()) {
| -------^^^^^^^---------------------------------------- help: try: `if cursor.position_over(layout.bounds()).is_some()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
|
redundant pattern matching, consider using `is_some()`:
src/widget/dots.rs#L233
warning: redundant pattern matching, consider using `is_some()`
--> src/widget/dots.rs:233:13
|
233 | if let Some(_) = cursor.position_over(layout.bounds()) {
| -------^^^^^^^---------------------------------------- help: try: `if cursor.position_over(layout.bounds()).is_some()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
|
redundant pattern matching, consider using `is_some()`:
src/widget/dots.rs#L165
warning: redundant pattern matching, consider using `is_some()`
--> src/widget/dots.rs:165:11
|
165 | if let Some(_) = cursor.position_over(bounds) {
| -------^^^^^^^------------------------------- help: try: `if cursor.position_over(bounds).is_some()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
= note: `#[warn(clippy::redundant_pattern_matching)]` on by default
|
very complex type used. Consider factoring parts into `type` definitions:
src/view/overview.rs#L513
warning: very complex type used. Consider factoring parts into `type` definitions
--> src/view/overview.rs:513:37
|
513 | let (passive, common, specific): (
| ______________________________________________^
514 | | Element<Self::Event, Theme>,
515 | | Element<Self::Event, Theme>,
516 | | Element<Self::Event, Theme>,
517 | | ) = if let KuruthTriggers::_Custom(KuruthTriggerSet {
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
|
large size difference between variants:
src/view/creator.rs#L23
warning: large size difference between variants
--> src/view/creator.rs:23:1
|
23 | / pub enum Event {
24 | | SplatChanged(Splat),
| | ------------------- the largest variant contains at least 208 bytes
25 | | Done,
| | ---- the second-largest variant carries no data at all
26 | | }
| |_^ the entire enum is at least 208 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
|
24 | SplatChanged(Box<Splat>),
| ~~~~~~~~~~
|
usage of an `Arc` that is not `Send` and `Sync`:
src/i18n.rs#L86
warning: usage of an `Arc` that is not `Send` and `Sync`
--> src/i18n.rs:86:42
|
86 | let localizer_arc: Arc<dyn Localizer> = Arc::new(localizer);
| ^^^^^^^^^^^^^^^^^^^
|
= 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
|
all variants have the same postfix: `Changed`:
src/component/skills.rs#L41
warning: all variants have the same postfix: `Changed`
--> src/component/skills.rs:41:1
|
41 | / pub enum Event {
42 | | SkillChanged(u16, Skill),
43 | | RoteSkillChanged(Skill),
44 | | SpecialtyChanged(Skill, usize, String),
45 | | SpecialtySkillChanged(Skill),
46 | | }
| |_^
|
= help: remove the postfixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
= note: `#[warn(clippy::enum_variant_names)]` on by default
|
variant `Msg` is never constructed:
src/main.rs#L83
warning: variant `Msg` is never constructed
--> src/main.rs:83:2
|
77 | enum Message {
| ------- variant in this enum
...
83 | Msg,
| ^^^
|
= note: `Message` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
unused variable: `cursor`:
src/widget/track.rs#L107
warning: unused variable: `cursor`
--> src/widget/track.rs:107:3
|
107 | cursor: mouse::Cursor,
| ^^^^^^ help: if this is intentional, prefix it with an underscore: `_cursor`
|
= note: `#[warn(unused_variables)]` on by default
|
unused import: `iced::border::Radius`:
src/widget/track.rs#L11
warning: unused import: `iced::border::Radius`
--> src/widget/track.rs:11:5
|
11 | use iced::border::Radius;
| ^^^^^^^^^^^^^^^^^^^^
|
unused import: `OverviewTab`:
src/view/mod.rs#L10
warning: unused import: `OverviewTab`
--> src/view/mod.rs:10:34
|
10 | pub use overview::{overview_tab, OverviewTab};
| ^^^^^^^^^^^
|
unused import: `CreatorView`:
src/view/mod.rs#L8
warning: unused import: `CreatorView`
--> src/view/mod.rs:8:33
|
8 | pub use creator::{creator_view, CreatorView};
| ^^^^^^^^^^^
|
unused import: `CharacterList`:
src/view/mod.rs#L7
warning: unused import: `CharacterList`
--> src/view/mod.rs:7:42
|
7 | pub use character_list::{character_list, CharacterList};
| ^^^^^^^^^^^^^
|
unused imports: `Column`, `Row`, and `overlay`:
src/view/creator.rs#L3
warning: unused imports: `Column`, `Row`, and `overlay`
--> src/view/creator.rs:3:31
|
3 | use iced::widget::{container, overlay, scrollable, Column, Row};
| ^^^^^^^ ^^^^^^ ^^^
|
unused import: `SkillsComponent`:
src/component/mod.rs#L16
warning: unused import: `SkillsComponent`
--> src/component/mod.rs:16:36
|
16 | pub use skills::{skills_component, SkillsComponent};
| ^^^^^^^^^^^^^^^
|
unused import: `List`:
src/component/mod.rs#L14
warning: unused import: `List`
--> src/component/mod.rs:14:22
|
14 | pub use list::{list, List};
| ^^^^
|
unused import: `InfoBar`:
src/component/mod.rs#L12
warning: unused import: `InfoBar`
--> src/component/mod.rs:12:26
|
12 | pub use info::{info_bar, InfoBar};
| ^^^^^^^
|
unused import: `AttributeBar`:
src/component/mod.rs#L10
warning: unused import: `AttributeBar`
--> src/component/mod.rs:10:37
|
10 | pub use attributes::{attribute_bar, AttributeBar};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` 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/
|