added trie as attribute to context #140
master.yml
on: pull_request
Miscellaneous checks
6m 51s
Rust tests
5m 23s
Rust Miri tests
8m 37s
Annotations
39 errors and 1 warning
enum `TrieKey` has a public `len` method, but no `is_empty` method:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L260
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)]`
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L192
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
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L183
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
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L171
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
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L127
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
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L122
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
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L110
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
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L88
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
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L83
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
|
using `clone` on type `u64` which implements the `Copy` trait:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L71
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)]`
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L520
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L491
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L457
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L419
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L364
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L332
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L278
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L222
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L104
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
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L68
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)]`
|
constant `TRANSFER_PORT_ID` is never used:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L39
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";
| ^^^^^^^^^^^^^^^^
|
constant `DEFAULT_PORT_ID` is never used:
solana/solana-ibc/programs/solana-ibc/src/execution_context.rs#L38
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)]`
|
unused variable: `sequence`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L286
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: _`
|
unused variable: `channel_id`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L286
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: _`
|
unused variable: `sequence`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L283
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: _`
|
unused variable: `channel_id`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L283
error: unused variable: `channel_id`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:283:46
|
283 | TrieKey::Receipts { port_id, channel_id, sequence } => {
| ^^^^^^^^^^ help: try ignoring the field: `channel_id: _`
|
unused variable: `sequence`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L280
error: unused variable: `sequence`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:280:60
|
280 | TrieKey::Commitment { port_id, channel_id, sequence } => {
| ^^^^^^^^ help: try ignoring the field: `sequence: _`
|
unused variable: `channel_id`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L280
error: unused variable: `channel_id`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:280:48
|
280 | TrieKey::Commitment { port_id, channel_id, sequence } => {
| ^^^^^^^^^^ help: try ignoring the field: `channel_id: _`
|
unused variable: `channel_id`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L277
error: unused variable: `channel_id`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:277:53
|
277 | TrieKey::NextSequenceAck { port_id, channel_id } => {
| ^^^^^^^^^^ help: try ignoring the field: `channel_id: _`
|
unused variable: `channel_id`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L274
error: unused variable: `channel_id`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:274:54
|
274 | TrieKey::NextSequenceRecv { port_id, channel_id } => {
| ^^^^^^^^^^ help: try ignoring the field: `channel_id: _`
|
unused variable: `channel_id`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L271
error: unused variable: `channel_id`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:271:54
|
271 | TrieKey::NextSequenceSend { port_id, channel_id } => {
| ^^^^^^^^^^ help: try ignoring the field: `channel_id: _`
|
unused variable: `channel_id`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L268
error: unused variable: `channel_id`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:268:48
|
268 | TrieKey::ChannelEnd { port_id, channel_id } => {
| ^^^^^^^^^^ help: try ignoring the field: `channel_id: _`
|
unused variable: `connection_id`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L267
error: unused variable: `connection_id`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:267:39
|
267 | TrieKey::Connection { connection_id } => size_of::<u32>(),
| ^^^^^^^^^^^^^ help: try ignoring the field: `connection_id: _`
|
unused variable: `height`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L264
error: unused variable: `height`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:264:66
|
264 | TrieKey::ConsensusState { client_id, epoch: u64, height } => {
| ^^^^^^ help: try ignoring the field: `height: _`
|
unused variable: `u64`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L264
error: unused variable: `u64`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:264:61
|
264 | TrieKey::ConsensusState { client_id, epoch: u64, height } => {
| ^^^ help: if this is intentional, prefix it with an underscore: `_u64`
|
= note: `-D unused-variables` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_variables)]`
|
variable does not need to be mutable:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L48
error: variable does not need to be mutable
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:48:13
|
48 | let mut solana_ibc_store: &mut SolanaIbcStorageTemp =
| ----^^^^^^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `-D unused-mut` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_mut)]`
|
value assigned to `trie` is never read:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L208
error: value assigned to `trie` is never read
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:208:9
|
208 | trie = solana_real_storage.trie.unwrap();
| ^^^^
|
= help: maybe it is overwritten before being read?
= note: `-D unused-assignments` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_assignments)]`
|
unused import: `anchor_lang::prelude`:
solana/solana-ibc/programs/solana-ibc/src/trie.rs#L5
error: unused import: `anchor_lang::prelude`
--> solana/solana-ibc/programs/solana-ibc/src/trie.rs:5:5
|
5 | use anchor_lang::prelude::*;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
Miscellaneous checks
Clippy had exited with the 101 exit code
|
Miscellaneous checks
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/
|