Skip to content

Merge pull request #32 from JerryZhongJ/fix-exit-panic #111

Merge pull request #32 from JerryZhongJ/fix-exit-panic

Merge pull request #32 from JerryZhongJ/fix-exit-panic #111

Triggered via push April 2, 2024 14:48
Status Success
Total duration 21s
Artifacts

todo.yaml

on: push
Fit to window
Zoom out
Zoom in

Annotations

17 warnings
accessing first element with `self.inner.get(0)`: clashctl/src/ui/utils/ticks_counter.rs#L47
warning: accessing first element with `self.inner.get(0)` --> clashctl/src/ui/utils/ticks_counter.rs:47:21 | 47 | / ((self.inner.get(0)? | ^^^^^^^^^^^^^^^^^ help: try: `self.inner.front()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: clashctl/src/ui/pages/status.rs#L94
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> clashctl/src/ui/pages/status.rs:94:20 | 94 | .chain(tails.into_iter()) | ^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `tails` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/1684a753dbca5d23b2e03568e6fbbb48eb72d0e6/library/core/src/iter/traits/iterator.rs:483:12 = 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
accessing first element with `proxy.history.get(0)`: clashctl/src/ui/components/proxy/item.rs#L20
warning: accessing first element with `proxy.history.get(0)` --> clashctl/src/ui/components/proxy/item.rs:20:22 | 20 | history: proxy.history.get(0).cloned(), | ^^^^^^^^^^^^^^^^^^^^ help: try: `proxy.history.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
direct implementation of `ToString`: clashctl/src/interactive/sort/mod.rs#L68
warning: direct implementation of `ToString` --> clashctl/src/interactive/sort/mod.rs:68:1 | 68 | / impl ToString for Noop { 69 | | fn to_string(&self) -> String { 70 | | "".into() 71 | | } 72 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
direct implementation of `ToString`: clashctl/src/interactive/sort/rule_sort.rs#L114
warning: direct implementation of `ToString` --> clashctl/src/interactive/sort/rule_sort.rs:114:1 | 114 | / impl ToString for RuleSort { 115 | | fn to_string(&self) -> String { 116 | | format!( 117 | | "{} {}", ... | 124 | | } 125 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
accessing first element with `b.1.history.get(0)`: clashctl/src/interactive/sort/proxy_sort.rs#L191
warning: accessing first element with `b.1.history.get(0)` --> clashctl/src/interactive/sort/proxy_sort.rs:191:62 | 191 | ProxySortBy::Delay => match (a.1.history.get(0), b.1.history.get(0)) { | ^^^^^^^^^^^^^^^^^^ help: try: `b.1.history.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
accessing first element with `a.1.history.get(0)`: clashctl/src/interactive/sort/proxy_sort.rs#L191
warning: accessing first element with `a.1.history.get(0)` --> clashctl/src/interactive/sort/proxy_sort.rs:191:42 | 191 | ProxySortBy::Delay => match (a.1.history.get(0), b.1.history.get(0)) { | ^^^^^^^^^^^^^^^^^^ help: try: `a.1.history.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
direct implementation of `ToString`: clashctl/src/interactive/sort/proxy_sort.rs#L167
warning: direct implementation of `ToString` --> clashctl/src/interactive/sort/proxy_sort.rs:167:1 | 167 | / impl ToString for ProxySort { 168 | | fn to_string(&self) -> String { 169 | | format!( 170 | | "{} {}", ... | 177 | | } 178 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl = note: `#[warn(clippy::to_string_trait_impl)]` on by default
accessing first element with `history.get(0)`: clashctl/src/proxy_render.rs#L111
warning: accessing first element with `history.get(0)` --> clashctl/src/proxy_render.rs:111:29 | 111 | let delay = history | _____________________________^ 112 | | .get(0) | |___________________________^ help: try: `history.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
accessing first element with `proxy .history.get(0)`: clashctl/src/proxy_render.rs#L60
warning: accessing first element with `proxy .history.get(0)` --> clashctl/src/proxy_render.rs:60:25 | 60 | let delay = proxy | _________________________^ 61 | | .history 62 | | .get(0) | |_______________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `#[warn(clippy::get_first)]` on by default help: try | 60 ~ let delay = proxy 61 + .history.first() |
private item shadows public glob re-export: clashctl/src/main.rs#L7
warning: private item shadows public glob re-export --> clashctl/src/main.rs:7:32 | 7 | use crate::{clap::Parser, Cmd, Opts}; | ^^^^ | note: the name `Opts` in the type namespace is supposed to be publicly re-exported here --> clashctl/src/main.rs:1:1 | 1 | mod_use::mod_use![command, proxy_render, utils, error, interactive, ui]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: but the private item here shadows it --> clashctl/src/main.rs:7:32 | 7 | use crate::{clap::Parser, Cmd, Opts}; | ^^^^ = note: this warning originates in the macro `mod_use::mod_use` (in Nightly builds, run with -Z macro-backtrace for more info)
the item `Cmd` is imported redundantly: clashctl/src/main.rs#L7
warning: the item `Cmd` is imported redundantly --> clashctl/src/main.rs:7:27 | 1 | mod_use::mod_use![command, proxy_render, utils, error, interactive, ui]; | ----------------------------------------------------------------------- the item `Cmd` is already imported here ... 7 | use crate::{clap::Parser, Cmd, Opts}; | ^^^
private item shadows public glob re-export: clashctl/src/main.rs#L7
warning: private item shadows public glob re-export --> clashctl/src/main.rs:7:27 | 7 | use crate::{clap::Parser, Cmd, Opts}; | ^^^ | note: the name `Cmd` in the type namespace is supposed to be publicly re-exported here --> clashctl/src/main.rs:1:1 | 1 | mod_use::mod_use![command, proxy_render, utils, error, interactive, ui]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: but the private item here shadows it --> clashctl/src/main.rs:7:27 | 7 | use crate::{clap::Parser, Cmd, Opts}; | ^^^ = note: this warning originates in the macro `mod_use::mod_use` (in Nightly builds, run with -Z macro-backtrace for more info)
the item `main_loop` is imported redundantly: clashctl/src/main.rs#L5
warning: the item `main_loop` is imported redundantly --> clashctl/src/main.rs:5:5 | 1 | mod_use::mod_use![command, proxy_render, utils, error, interactive, ui]; | ----------------------------------------------------------------------- the item `main_loop` is already imported here ... 5 | use ui::main_loop; | ^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
private item shadows public glob re-export: clashctl/src/main.rs#L5
warning: private item shadows public glob re-export --> clashctl/src/main.rs:5:5 | 5 | use ui::main_loop; | ^^^^^^^^^^^^^ | note: the name `main_loop` in the value namespace is supposed to be publicly re-exported here --> clashctl/src/main.rs:1:1 | 1 | mod_use::mod_use![command, proxy_render, utils, error, interactive, ui]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: but the private item here shadows it --> clashctl/src/main.rs:5:5 | 5 | use ui::main_loop; | ^^^^^^^^^^^^^ = note: `#[warn(hidden_glob_reexports)]` on by default = note: this warning originates in the macro `mod_use::mod_use` (in Nightly builds, run with -Z macro-backtrace for more info)
direct implementation of `ToString`: clashctl-core/src/model/mod.rs#L52
warning: direct implementation of `ToString` --> clashctl-core/src/model/mod.rs:52:1 | 52 | / impl ToString for VersionPayload { 53 | | fn to_string(&self) -> String { 54 | | match self { 55 | | #[cfg(feature = "deserialize")] ... | 59 | | } 60 | | } | |_^ | = help: prefer implementing `Display` instead = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl = note: `#[warn(clippy::to_string_trait_impl)]` on by default
unused import: `deserialize::*`: clashctl-core/src/model/connection.rs#L58
warning: unused import: `deserialize::*` --> clashctl-core/src/model/connection.rs:58:9 | 58 | pub use deserialize::*; | ^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default