Refactor proxy #1613
Annotations
16 warnings
used `unwrap()` on a `Result` value:
plane/src/proxy/proxy_server.rs#L104
warning: used `unwrap()` on a `Result` value
--> plane/src/proxy/proxy_server.rs:104:21
|
104 | upgrade_handler.run().await.unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is an `Err`, it will panic
= help: consider using `expect()` to provide a better panic message
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
|
used `unwrap()` on a `Result` value:
plane/src/proxy/proxy_server.rs#L95
warning: used `unwrap()` on a `Result` value
--> plane/src/proxy/proxy_server.rs:95:42
|
95 | let (res, upgrade_handler) = inner.proxy_client.request(request).await.unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is an `Err`, it will panic
= help: consider using `expect()` to provide a better panic message
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
|
used `unwrap()` on a `Result` value:
plane/src/proxy/proxy_server.rs#L79
warning: used `unwrap()` on a `Result` value
--> plane/src/proxy/proxy_server.rs:79:29
|
79 | request.parts.uri = Uri::from_parts(uri_parts).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is an `Err`, it will panic
= help: consider using `expect()` to provide a better panic message
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
|
used `unwrap()` on an `Option` value:
plane/src/proxy/proxy_server.rs#L77
warning: used `unwrap()` on an `Option` value
--> plane/src/proxy/proxy_server.rs:77:28
|
77 | let bearer_token = bearer_token.unwrap();
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: if this value is `None`, it will panic
= help: consider using `expect()` to provide a better panic message
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used
note: the lint level is defined here
--> plane/src/lib.rs:1:9
|
1 | #![warn(clippy::unwrap_used)]
| ^^^^^^^^^^^^^^^^^^^
|
this expression creates a reference which is immediately dereferenced by the compiler:
plane/src/proxy/cert_pair.rs#L79
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> plane/src/proxy/cert_pair.rs:79:38
|
79 | let key = any_supported_type(&key)?;
| ^^^^ help: change this to: `key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
plane/src/proxy/cert_pair.rs#L79
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> plane/src/proxy/cert_pair.rs:79:38
|
79 | let key = any_supported_type(&key)?;
| ^^^^ help: change this to: `key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
function `subdomain_from_host` is never used:
plane/src/proxy/request.rs#L14
warning: function `subdomain_from_host` is never used
--> plane/src/proxy/request.rs:14:8
|
14 | pub fn subdomain_from_host<'a>(
| ^^^^^^^^^^^^^^^^^^^
|
constant `HTTPS_PORT_SUFFIX` is never used:
plane/src/proxy/request.rs#L8
warning: constant `HTTPS_PORT_SUFFIX` is never used
--> plane/src/proxy/request.rs:8:7
|
8 | const HTTPS_PORT_SUFFIX: &str = ":443";
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused variable: `https_redirect`:
plane/src/proxy/mod.rs#L115
warning: unused variable: `https_redirect`
--> plane/src/proxy/mod.rs:115:9
|
115 | let https_redirect = config.port_config.https_port.is_some();
| ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_https_redirect`
|
= note: `#[warn(unused_variables)]` on by default
|
unused variable: `https_redirect`:
plane/src/proxy/mod.rs#L115
warning: unused variable: `https_redirect`
--> plane/src/proxy/mod.rs:115:9
|
115 | let https_redirect = config.port_config.https_port.is_some();
| ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_https_redirect`
|
= note: `#[warn(unused_variables)]` on by default
|
check-rust-clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@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-rust-clippy
The following actions use a deprecated Node.js version and will be forced to run on node20: actions-rs/toolchain@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-rust-clippy
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-rust-clippy
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-rust-clippy
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-rust-clippy
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/
|