Skip to content

storing data in trie in execution context

Sign in for the full log view
This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / clippy failed Oct 18, 2023 in 0s

clippy

38 errors

Details

Results

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

Versions

  • rustc 1.75.0-nightly (09df6108c 2023-10-17)
  • cargo 1.75.0-nightly (8eb8acbb1 2023-10-17)
  • clippy 0.1.75 (09df610 2023-10-17)

Annotations

Check failure on line 260 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

enum `TrieKey` has a public `len` method, but no `is_empty` method

error: enum `TrieKey` has a public `len` method, but no `is_empty` method
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:260:5
    |
260 |     pub fn len(&self) -> usize {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
    = note: `-D clippy::len-without-is-empty` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::len_without_is_empty)]`

Check failure on line 192 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:192:13
    |
192 |             solana_real_storage.channel_counter.clone();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_real_storage.channel_counter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 183 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:183:13
    |
183 |             solana_real_storage.connection_counter.clone();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_real_storage.connection_counter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 171 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:171:13
    |
171 |             solana_real_storage.client_counter.clone();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_real_storage.client_counter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 127 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:127:30
    |
127 |             channel_counter: solana_ibc_store.channel_counter.clone(),
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_ibc_store.channel_counter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 122 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:122:33
    |
122 |             connection_counter: solana_ibc_store.connection_counter.clone(),
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_ibc_store.connection_counter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 110 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:110:29
    |
110 |             client_counter: solana_ibc_store.client_counter.clone(),
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_ibc_store.client_counter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 88 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
  --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:88:30
   |
88 |             channel_counter: solana_ibc_store.channel_counter.clone(),
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_ibc_store.channel_counter`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 83 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
  --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:83:33
   |
83 |             connection_counter: solana_ibc_store.connection_counter.clone(),
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_ibc_store.connection_counter`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

Check failure on line 71 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

using `clone` on type `u64` which implements the `Copy` trait

error: using `clone` on type `u64` which implements the `Copy` trait
  --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:71:29
   |
71 |             client_counter: solana_ibc_store.client_counter.clone(),
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `solana_ibc_store.client_counter`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
   = note: `-D clippy::clone-on-copy` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`

Check failure on line 520 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:520:13
    |
520 |             &next_seq_ack_trie_key,
    |             ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `next_seq_ack_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 491 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:491:13
    |
491 |             &next_seq_recv_trie_key,
    |             ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `next_seq_recv_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 457 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:457:13
    |
457 |             &next_seq_send_trie_key,
    |             ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `next_seq_send_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 419 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:419:13
    |
419 |             &channel_end_trie_key,
    |             ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `channel_end_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 364 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:364:13
    |
364 |             &ack_commitment_trie_key,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `ack_commitment_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 332 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:332:18
    |
332 |         trie.set(&receipt_trie_key, &lib::hash::CryptoHash::DEFAULT).unwrap();
    |                  ^^^^^^^^^^^^^^^^^ help: change this to: `receipt_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 278 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:278:13
    |
278 |             &commitment_trie_key,
    |             ^^^^^^^^^^^^^^^^^^^^ help: change this to: `commitment_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 222 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:222:13
    |
222 |             &consensus_state_trie_key,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `consensus_state_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 104 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
   --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:104:13
    |
104 |             &consensus_state_trie_key,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `consensus_state_trie_key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check failure on line 68 in solana/solana-ibc/programs/solana-ibc/src/execution_context.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
  --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:68:13
   |
68 |             &client_state_trie_key,
   |             ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `client_state_trie_key`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-D clippy::needless-borrow` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`

Check failure on line 39 in solana/solana-ibc/programs/solana-ibc/src/execution_context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constant `TRANSFER_PORT_ID` is never used

error: constant `TRANSFER_PORT_ID` is never used
  --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:39:7
   |
39 | const TRANSFER_PORT_ID: &str = "transfer";
   |       ^^^^^^^^^^^^^^^^

Check failure on line 38 in solana/solana-ibc/programs/solana-ibc/src/execution_context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constant `DEFAULT_PORT_ID` is never used

error: constant `DEFAULT_PORT_ID` is never used
  --> solana/solana-ibc/programs/solana-ibc/src/execution_context.rs:38:7
   |
38 | const DEFAULT_PORT_ID: &str = "defaultPort";
   |       ^^^^^^^^^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(dead_code)]`

Check failure on line 286 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `sequence`

error: unused variable: `sequence`
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:286:54
    |
286 |                 TrieKey::Acks { port_id, channel_id, sequence } => {
    |                                                      ^^^^^^^^ help: try ignoring the field: `sequence: _`

Check failure on line 286 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `channel_id`

error: unused variable: `channel_id`
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:286:42
    |
286 |                 TrieKey::Acks { port_id, channel_id, sequence } => {
    |                                          ^^^^^^^^^^ help: try ignoring the field: `channel_id: _`

Check failure on line 283 in solana/solana-ibc/programs/solana-ibc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `sequence`

error: unused variable: `sequence`
   --> solana/solana-ibc/programs/solana-ibc/src/lib.rs:283:58
    |
283 |                 TrieKey::Receipts { port_id, channel_id, sequence } => {
    |                                                          ^^^^^^^^ help: try ignoring the field: `sequence: _`