Skip to content

Store packets

Store packets #240

Triggered via pull request October 30, 2023 19:35
Status Failure
Total duration 10m 3s
Artifacts

master.yml

on: pull_request
Fit to window
Zoom out
Zoom in

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/