Store packets #240
master.yml
on: pull_request
Miscellaneous checks
6m 54s
Rust tests
5m 46s
Rust Miri tests
9m 54s
Annotations
3 errors and 1 warning
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L71
error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:71:17
|
71 | / match msg {
72 | | MsgEnvelope::Packet(packet) => {
73 | | // store the packet if not exists
74 | | let mut inner_store = store.0.borrow_mut();
... |
90 | | _ => (),
91 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `-D clippy::single-match` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::single_match)]`
help: try
|
71 ~ if let MsgEnvelope::Packet(packet) = msg {
72 + // store the packet if not exists
73 + let mut inner_store = store.0.borrow_mut();
74 + let serialized_packet = borsh::to_vec(&packet).unwrap();
75 + // Find if the packet already exists
76 + match inner_store
77 + .private
78 + .packets
79 + .iter()
80 + .find(|&pack| pack == &serialized_packet)
81 + {
82 + Some(_) => (),
83 + None => inner_store
84 + .private
85 + .packets
86 + .push(serialized_packet),
87 + }
88 + }
|
|
unused import: `ibc::core::ics04_channel::msgs::PacketMsg`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L12
error: unused import: `ibc::core::ics04_channel::msgs::PacketMsg`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:12:5
|
12 | use ibc::core::ics04_channel::msgs::PacketMsg;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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/
|