Skip to content

v0.2 concept

v0.2 concept #773

GitHub Actions / clippy succeeded Jan 26, 2025 in 1s

clippy

8 warnings

Details

Results

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

Versions

  • rustc 1.84.0 (9fc6b4312 2025-01-07)
  • cargo 1.84.0 (66221abde 2024-11-19)
  • clippy 0.1.84 (9fc6b43126 2025-01-07)

Annotations

Check warning on line 67 in crates/enclave/core/src/store/default.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of an assign operation

warning: manual implementation of an assign operation
  --> crates/enclave/core/src/store/default.rs:67:9
   |
67 |         self.seq_num = self.seq_num + (count as u64);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.seq_num += (count as u64)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
   = note: `#[warn(clippy::assign_op_pattern)]` on by default

Check warning on line 67 in crates/enclave/core/src/store/default.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of an assign operation

warning: manual implementation of an assign operation
  --> crates/enclave/core/src/store/default.rs:67:9
   |
67 |         self.seq_num = self.seq_num + (count as u64);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `self.seq_num += (count as u64)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
   = note: `#[warn(clippy::assign_op_pattern)]` on by default

Check warning on line 54 in crates/enclave/core/src/store/default.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `Option<[u8; 32]>` which implements the `Copy` trait

warning: using `clone` on type `Option<[u8; 32]>` which implements the `Copy` trait
  --> crates/enclave/core/src/store/default.rs:54:12
   |
54 |         Ok(self.nonce.clone())
   |            ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nonce`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
   = note: `#[warn(clippy::clone_on_copy)]` on by default

Check warning on line 54 in crates/enclave/core/src/store/default.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `Option<[u8; 32]>` which implements the `Copy` trait

warning: using `clone` on type `Option<[u8; 32]>` which implements the `Copy` trait
  --> crates/enclave/core/src/store/default.rs:54:12
   |
54 |         Ok(self.nonce.clone())
   |            ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nonce`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
   = note: `#[warn(clippy::clone_on_copy)]` on by default

Check warning on line 115 in crates/enclave/core/src/host.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression borrows a value the compiler would automatically borrow

warning: this expression borrows a value the compiler would automatically borrow
   --> crates/enclave/core/src/host.rs:115:33
    |
115 |                 let tx_config = (&self.gas_fn)(&response);
    |                                 ^^^^^^^^^^^^^^ help: change this to: `(self.gas_fn)`
    |
    = 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 115 in crates/enclave/core/src/host.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression borrows a value the compiler would automatically borrow

warning: this expression borrows a value the compiler would automatically borrow
   --> crates/enclave/core/src/host.rs:115:33
    |
115 |                 let tx_config = (&self.gas_fn)(&response);
    |                                 ^^^^^^^^^^^^^^ help: change this to: `(self.gas_fn)`
    |
    = 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 81 in crates/enclave/core/src/handler.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> crates/enclave/core/src/handler.rs:79:48
   |
79 |           return Err(Status::failed_precondition(&format!(
   |  ________________________________________________^
80 | |             "seq_num_diff mismatch: num({seq_num_diff}) v/s diff({pending_sequenced_requests})"
81 | |         )));
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
help: change this to
   |
79 ~         return Err(Status::failed_precondition(format!(
80 +             "seq_num_diff mismatch: num({seq_num_diff}) v/s diff({pending_sequenced_requests})"
81 ~         )));
   |

Check warning on line 81 in crates/enclave/core/src/handler.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> crates/enclave/core/src/handler.rs:79:48
   |
79 |           return Err(Status::failed_precondition(&format!(
   |  ________________________________________________^
80 | |             "seq_num_diff mismatch: num({seq_num_diff}) v/s diff({pending_sequenced_requests})"
81 | |         )));
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
help: change this to
   |
79 ~         return Err(Status::failed_precondition(format!(
80 +             "seq_num_diff mismatch: num({seq_num_diff}) v/s diff({pending_sequenced_requests})"
81 ~         )));
   |