Skip to content

Better handle network errors #355

Better handle network errors

Better handle network errors #355

GitHub Actions / clippy failed Jan 3, 2024 in 0s

clippy

40 errors

Details

Results

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

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check failure on line 211 in pkcs11/src/backend/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

error: useless use of `format!`
   --> pkcs11/src/backend/mod.rs:211:46
    |
211 |                 ApiError::InstanceRemoved => format!("Failed to connect to instance"),
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Failed to connect to instance".to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
    = note: `-D clippy::useless-format` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_format)]`

Check failure on line 113 in pkcs11/src/backend/sign.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/sign.rs:113:21
    |
113 |                     &conf,
    |                     ^^^^^ help: change this to: `conf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 628 in pkcs11/src/backend/session.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/session.rs:628:66
    |
628 |                     |api_config| default_api::keys_key_id_delete(&api_config, &key.id),
    |                                                                  ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 622 in pkcs11/src/backend/session.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/session.rs:622:71
    |
622 |                     |api_config| default_api::keys_key_id_cert_delete(&api_config, &key.id),
    |                                                                       ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 518 in pkcs11/src/backend/session.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/session.rs:518:52
    |
518 |                 |api_config| default_api::keys_get(&api_config, None),
    |                                                    ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 279 in pkcs11/src/backend/login.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/login.rs:279:21
    |
279 |                     &config,
    |                     ^^^^^^^ help: change this to: `config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 517 in pkcs11/src/backend/key.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/key.rs:517:56
    |
517 |         |api_config| default_api::keys_key_id_cert_get(&api_config, key_id),
    |                                                        ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 474 in pkcs11/src/backend/key.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/key.rs:474:51
    |
474 |         |api_config| default_api::keys_key_id_get(&api_config, key_id),
    |                                                   ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 442 in pkcs11/src/backend/key.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/key.rs:442:17
    |
442 |                 &api_config,
    |                 ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 342 in pkcs11/src/backend/key.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/key.rs:342:21
    |
342 |                     &api_config,
    |                     ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 327 in pkcs11/src/backend/key.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/key.rs:327:21
    |
327 |                     &api_config,
    |                     ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 188 in pkcs11/src/backend/key.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/key.rs:188:56
    |
188 |         |api_config| default_api::keys_key_id_cert_put(&api_config, key_id, body.into_bytes()),
    |                                                        ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 42 in pkcs11/src/backend/events.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

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> pkcs11/src/backend/events.rs:42:54
   |
42 |                 |conf| default_api::health_state_get(&conf),
   |                                                      ^^^^^ help: change this to: `conf`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 125 in pkcs11/src/backend/encrypt.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/encrypt.rs:125:21
    |
125 |                     &api_config,
    |                     ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 78 in pkcs11/src/backend/decrypt.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

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> pkcs11/src/backend/decrypt.rs:78:21
   |
78 |                     &api_config,
   |                     ^^^^^^^^^^^ help: change this to: `api_config`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 193 in pkcs11/src/api/token.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/api/token.rs:193:49
    |
193 |             |conf| default_api::system_info_get(&conf),
    |                                                 ^^^^^ help: change this to: `conf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 171 in pkcs11/src/api/token.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/api/token.rs:171:38
    |
171 |         |conf| default_api::info_get(&conf),
    |                                      ^^^^^ help: change this to: `conf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 111 in pkcs11/src/api/token.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/api/token.rs:111:46
    |
111 |         |conf| default_api::health_state_get(&conf),
    |                                              ^^^^^ help: change this to: `conf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 93 in pkcs11/src/api/token.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

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> pkcs11/src/api/token.rs:93:38
   |
93 |         |conf| default_api::info_get(&conf),
   |                                      ^^^^^ help: change this to: `conf`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 211 in pkcs11/src/backend/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

error: useless use of `format!`
   --> pkcs11/src/backend/mod.rs:211:46
    |
211 |                 ApiError::InstanceRemoved => format!("Failed to connect to instance"),
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Failed to connect to instance".to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
    = note: `-D clippy::useless-format` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_format)]`

Check failure on line 113 in pkcs11/src/backend/sign.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/sign.rs:113:21
    |
113 |                     &conf,
    |                     ^^^^^ help: change this to: `conf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 628 in pkcs11/src/backend/session.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/session.rs:628:66
    |
628 |                     |api_config| default_api::keys_key_id_delete(&api_config, &key.id),
    |                                                                  ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 622 in pkcs11/src/backend/session.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/session.rs:622:71
    |
622 |                     |api_config| default_api::keys_key_id_cert_delete(&api_config, &key.id),
    |                                                                       ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 518 in pkcs11/src/backend/session.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/session.rs:518:52
    |
518 |                 |api_config| default_api::keys_get(&api_config, None),
    |                                                    ^^^^^^^^^^^ help: change this to: `api_config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 279 in pkcs11/src/backend/login.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

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> pkcs11/src/backend/login.rs:279:21
    |
279 |                     &config,
    |                     ^^^^^^^ help: change this to: `config`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow