wip: address some clippy lints #25
Annotations
3 errors and 15 warnings
|
ubuntu / stable
Process completed with exit code 101.
|
|
ubuntu / beta
The strategy configuration was canceled because "required.stable" failed
|
|
ubuntu / beta
The operation was canceled.
|
|
[clippy] src/wireguard.rs#L195:
src/wireguard.rs#L195
warning: this function has too many arguments (9/7)
--> src/wireguard.rs:195:5
|
195 | / pub async fn setup(
196 | | origin_keys: WireGuardKeys,
197 | | proxy_public_key: String,
198 | | proxy_endpoint: String,
... |
204 | | download_limit: Option<u32>, // Download limit in Mbps (proxy -> origin)
205 | | ) -> Result<Self> {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
|
[clippy] src/aws/mod.rs#L142:
src/aws/mod.rs#L142
warning: this function has too many arguments (18/7)
--> src/aws/mod.rs:142:5
|
142 | / pub async fn deploy(
143 | | ingress_host: String,
144 | | ingress_port: u16,
145 | | ingress_protocol: String,
... |
160 | | port_mappings: Vec<(u16, String)>,
161 | | ) -> Result<Self> {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#too_many_arguments
|
|
[clippy] src/wireguard.rs#L195:
src/wireguard.rs#L195
warning: this function has too many arguments (9/7)
--> src/wireguard.rs:195:5
|
195 | / pub async fn setup(
196 | | origin_keys: WireGuardKeys,
197 | | proxy_public_key: String,
198 | | proxy_endpoint: String,
... |
204 | | download_limit: Option<u32>, // Download limit in Mbps (proxy -> origin)
205 | | ) -> Result<Self> {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
|
[clippy] src/aws/mod.rs#L142:
src/aws/mod.rs#L142
warning: this function has too many arguments (18/7)
--> src/aws/mod.rs:142:5
|
142 | / pub async fn deploy(
143 | | ingress_host: String,
144 | | ingress_port: u16,
145 | | ingress_protocol: String,
... |
160 | | port_mappings: Vec<(u16, String)>,
161 | | ) -> Result<Self> {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#too_many_arguments
|
|
[clippy] src/wireguard.rs#L195:
src/wireguard.rs#L195
warning: this function has too many arguments (9/7)
--> src/wireguard.rs:195:5
|
195 | / pub async fn setup(
196 | | origin_keys: WireGuardKeys,
197 | | proxy_public_key: String,
198 | | proxy_endpoint: String,
... |
204 | | download_limit: Option<u32>, // Download limit in Mbps (proxy -> origin)
205 | | ) -> Result<Self> {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
|
[clippy] src/aws/mod.rs#L142:
src/aws/mod.rs#L142
warning: this function has too many arguments (18/7)
--> src/aws/mod.rs:142:5
|
142 | / pub async fn deploy(
143 | | ingress_host: String,
144 | | ingress_port: u16,
145 | | ingress_protocol: String,
... |
160 | | port_mappings: Vec<(u16, String)>,
161 | | ) -> Result<Self> {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#too_many_arguments
|
|
[clippy] src/main.rs#L458:
src/main.rs#L458
warning: unused variable: `state`
--> src/main.rs:458:13
|
458 | let state = crate::api::AppState {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_state`
|
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
|
|
[clippy] src/main.rs#L463:
src/main.rs#L463
warning: unused variable: `app`
--> src/main.rs:463:13
|
463 | let app = crate::api::router(state);
| ^^^ help: if this is intentional, prefix it with an underscore: `_app`
|
|
[clippy] src/main.rs#L465:
src/main.rs#L465
warning: unused variable: `listener`
--> src/main.rs:465:13
|
465 | let listener = TcpListener::bind("0.0.0.0:3000").await?;
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_listener`
|
|
[clippy] src/main.rs#L465:
src/main.rs#L465
warning: unused variable: `val`
--> src/main.rs:465:24
|
465 | let listener = TcpListener::bind("0.0.0.0:3000").await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_val`
|
|
[clippy] src/main.rs#L466:
src/main.rs#L466
warning: unused variable: `val`
--> src/main.rs:466:9
|
466 | axum::serve(listener, app).await?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_val`
|
|
[clippy] src/main.rs#L100:
src/main.rs#L100
warning: called `unwrap` on `upload_limit` after checking its variant with `is_some`
--> src/main.rs:100:48
|
99 | if upload_limit.is_some() {
| ------------------------- help: try: `if let Some(<item>) = upload_limit`
100 | info!(" - Upload limit: {} Mbps", upload_limit.unwrap());
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#unnecessary_unwrap
= note: `#[warn(clippy::unnecessary_unwrap)]` on by default
|
|
[clippy] src/main.rs#L103:
src/main.rs#L103
warning: called `unwrap` on `download_limit` after checking its variant with `is_some`
--> src/main.rs:103:50
|
102 | if download_limit.is_some() {
| --------------------------- help: try: `if let Some(<item>) = download_limit`
103 | info!(" - Download limit: {} Mbps", download_limit.unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#unnecessary_unwrap
|
|
[clippy] src/wireguard.rs#L195:
src/wireguard.rs#L195
warning: this function has too many arguments (9/7)
--> src/wireguard.rs:195:5
|
195 | / pub async fn setup(
196 | | origin_keys: WireGuardKeys,
197 | | proxy_public_key: String,
198 | | proxy_endpoint: String,
... |
204 | | download_limit: Option<u32>, // Download limit in Mbps (proxy -> origin)
205 | | ) -> Result<Self> {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
|
|
[clippy] src/aws/mod.rs#L142:
src/aws/mod.rs#L142
warning: this function has too many arguments (18/7)
--> src/aws/mod.rs:142:5
|
142 | / pub async fn deploy(
143 | | ingress_host: String,
144 | | ingress_port: u16,
145 | | ingress_protocol: String,
... |
160 | | port_mappings: Vec<(u16, String)>,
161 | | ) -> Result<Self> {
| |_____________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/beta/index.html#too_many_arguments
|