Skip to content

Refactor proxy

Refactor proxy #1631

GitHub Actions / clippy succeeded Sep 24, 2024 in 0s

clippy

25 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 25
Note 0
Help 0

Versions

  • rustc 1.81.0 (eeb90cda1 2024-09-04)
  • cargo 1.81.0 (2dbb1af80 2024-08-20)
  • clippy 0.1.81 (eeb90cd 2024-09-04)

Annotations

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 193 in plane/plane-tests/tests/common/resources/pebble.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `avoid_weird_mac_bug` is never used

warning: function `avoid_weird_mac_bug` is never used
   --> plane/plane-tests/tests/common/resources/pebble.rs:193:14
    |
193 | pub async fn avoid_weird_mac_bug(name: &str, scratch_dir: &Path) -> Result<()> {
    |              ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 196 in plane/src/proxy/proxy_server.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> plane/src/proxy/proxy_server.rs:193:24
    |
193 |       let mut response = Response::builder()
    |  ________________________^
194 | |         .status(status_code)
195 | |         .body(simple_empty_body())
196 | |         .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

Check warning on line 118 in plane/src/proxy/proxy_server.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
   --> plane/src/proxy/proxy_server.rs:118:17
    |
118 |                 HeaderValue::from_str(&route_info.backend_id.to_string()).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

Check warning on line 104 in plane/src/proxy/proxy_server.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

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

Check warning on line 94 in plane/src/proxy/proxy_server.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
  --> plane/src/proxy/proxy_server.rs:94:46
   |
94 |             let (mut 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

Check warning on line 76 in plane/src/proxy/proxy_server.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

used `unwrap()` on a `Result` value

warning: used `unwrap()` on a `Result` value
  --> plane/src/proxy/proxy_server.rs:76:29
   |
76 |         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
note: the lint level is defined here
  --> plane/src/lib.rs:1:9
   |
1  | #![warn(clippy::unwrap_used)]
   |         ^^^^^^^^^^^^^^^^^^^

Check warning on line 79 in plane/src/proxy/cert_pair.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 79 in plane/src/proxy/cert_pair.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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