refactor: UI Improvements And Archived Bookmarks Fetching #18
Annotations
1 error and 11 warnings
lint
Error: @augu/clippy-action failed to run
|
lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
variant name ends with the enum's name:
src/main.rs#L81
warning: variant name ends with the enum's name
--> src/app.rs:81:5
|
81 | EmpptyMessage,
| ^^^^^^^^^^^^^
|
= 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
|
large size difference between variants:
src/main.rs#L118
warning: large size difference between variants
--> src/app.rs:118:1
|
118 | / pub enum DialogPage {
119 | | RemoveAccount(Account),
| | ---------------------- the second-largest variant contains at least 104 bytes
120 | | RemoveBookmark(Account, Bookmark),
| | --------------------------------- the largest variant contains at least 448 bytes
121 | | }
| |_^ the entire enum is at least 448 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
|
120 | RemoveBookmark(Account, Box<Bookmark>),
| ~~~~~~~~~~~~~
|
useless conversion to the same type: `cosmic::iced_core::Element<'_, app::Message, cosmic::Theme, cosmic::iced_renderer::fallback::Renderer<cosmic::iced_wgpu::Renderer, iced_tiny_skia::Renderer>>`:
src/main.rs#L279
warning: useless conversion to the same type: `cosmic::iced_core::Element<'_, app::Message, cosmic::Theme, cosmic::iced_renderer::fallback::Renderer<cosmic::iced_wgpu::Renderer, iced_tiny_skia::Renderer>>`
--> src/app.rs:279:13
|
279 | (widget::toaster(&self.toasts, widget::horizontal_space()).into()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `widget::toaster(&self.toasts, widget::horizontal_space())`
|
= 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
|
this boolean expression can be simplified:
src/main.rs#L607
warning: this boolean expression can be simplified
--> src/app.rs:607:20
|
607 | if !account_details.is_none() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `account_details.is_some()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
= note: `#[warn(clippy::nonminimal_bool)]` on by default
|
this boolean expression can be simplified:
src/main.rs#L860
warning: this boolean expression can be simplified
--> src/app.rs:860:20
|
860 | if !self.dialog_pages.pop_front().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.dialog_pages.pop_front().is_none()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
|
this boolean expression can be simplified:
src/main.rs#L866
warning: this boolean expression can be simplified
--> src/app.rs:866:20
|
866 | if !self.dialog_pages.pop_front().is_some() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.dialog_pages.pop_front().is_none()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool
|
this let-binding has unit value:
src/main.rs#L371
warning: this let-binding has unit value
--> src/app.rs:371:17
|
371 | _ = self.nav.activate(account_page_entity.unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: omit the `let` binding: `self.nav.activate(account_page_entity.unwrap());`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `#[warn(clippy::let_unit_value)]` on by default
|
redundant closure:
src/main.rs#L544
warning: redundant closure
--> src/app.rs:544:63
|
544 | ... response.bookmarks.unwrap_or_else(|| Vec::new()),
| ^^^^^^^^^^^^^ help: replace the closure with the function itself: `Vec::new`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
redundant closure:
src/main.rs#L586
warning: redundant closure
--> src/app.rs:586:63
|
586 | ... response.bookmarks.unwrap_or_else(|| Vec::new()),
| ^^^^^^^^^^^^^ help: replace the closure with the function itself: `Vec::new`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
src/main.rs#L906
warning: redundant closure
--> src/app.rs:906:21
|
906 | |msg| cosmic::app::Message::App(msg),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `cosmic::app::Message::App`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|