Transfer implementation #362
master.yml
on: pull_request
Miscellaneous checks
4m 12s
Build SBF
10m 56s
Rust tests
3m 37s
Rust Miri tests
4m 19s
Annotations
13 errors and 1 warning
this call to `as_ref` does nothing:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L462
error: this call to `as_ref` does nothing
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:462:85
|
462 | ...s = [port_id.as_bytes().as_ref(), channel_id.as_bytes().as_ref()], bump, token::mint = token_mint, token::authority = sender)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `channel_id.as_bytes()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
|
this call to `as_ref` does nothing:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L462
error: this call to `as_ref` does nothing
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:462:56
|
462 | #[account(init_if_needed, payer = sender, seeds = [port_id.as_bytes().as_ref(), channel_id.as_bytes().as_ref()], bump, token::mint = ...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `port_id.as_bytes()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
|
this call to `as_ref` does nothing:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L460
error: this call to `as_ref` does nothing
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:460:56
|
460 | #[account(init_if_needed, payer = sender, seeds = [base_denom.as_bytes().as_ref()], bump, mint::decimals = 6, mint::authority = mint_...
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `base_denom.as_bytes()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
|
this call to `as_ref` does nothing:
solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs#L214
error: this call to `as_ref` does nothing
--> solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs:214:43
|
214 | [port_id.as_bytes().as_ref(), channel_id.as_bytes().as_ref()];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `channel_id.as_bytes()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
|
this call to `as_ref` does nothing:
solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs#L214
error: this call to `as_ref` does nothing
--> solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs:214:14
|
214 | [port_id.as_bytes().as_ref(), channel_id.as_bytes().as_ref()];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `port_id.as_bytes()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
|
passing a unit value to a function:
solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs#L197
error: passing a unit value to a function
--> solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs:197:9
|
197 | Ok(anchor_spl::token::burn(cpi_ctx, amount_in_u64).unwrap())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
197 ~ anchor_spl::token::burn(cpi_ctx, amount_in_u64).unwrap();
198 + Ok(())
|
|
passing a unit value to a function:
solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs#L151
error: passing a unit value to a function
--> solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs:151:9
|
151 | Ok(anchor_spl::token::mint_to(cpi_ctx, amount_in_u64).unwrap())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
help: move the expression in front of the call and replace it with the unit literal `()`
|
151 ~ anchor_spl::token::mint_to(cpi_ctx, amount_in_u64).unwrap();
152 + Ok(())
|
|
this call to `as_ref` does nothing:
solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs#L136
error: this call to `as_ref` does nothing
--> solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs:136:26
|
136 | let inner = vec![MINT_ESCROW_SEED.as_ref(), bump_vector.as_ref()];
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `MINT_ESCROW_SEED`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
= note: `-D clippy::useless-asref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::useless_asref)]`
|
passing a unit value to a function:
solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs#L102
error: passing a unit value to a function
--> solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs:102:9
|
102 | Ok(anchor_spl::token::transfer(cpi_ctx, amount_in_u64).unwrap())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg
= note: `-D clippy::unit-arg` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unit_arg)]`
help: move the expression in front of the call and replace it with the unit literal `()`
|
102 ~ anchor_spl::token::transfer(cpi_ctx, amount_in_u64).unwrap();
103 + Ok(())
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs#L25
error: this expression creates a reference which is immediately dereferenced by the compiler
--> solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs:25:29
|
25 | Ok(Pubkey::from_str(&value.as_ref()).map(Self)?)
| ^^^^^^^^^^^^^^^ help: change this to: `value.as_ref()`
|
= 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)]`
|
question mark operator is useless here:
solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs#L25
error: question mark operator is useless here
--> solana/solana-ibc/programs/solana-ibc/src/transfer/impls.rs:25:9
|
25 | Ok(Pubkey::from_str(&value.as_ref()).map(Self)?)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `Pubkey::from_str(&value.as_ref()).map(Self)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
= note: `-D clippy::needless-question-mark` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_question_mark)]`
|
unused variable: `inner`:
solana/solana-ibc/programs/solana-ibc/src/lib.rs#L184
error: unused variable: `inner`
--> solana/solana-ibc/programs/solana-ibc/src/lib.rs:184:13
|
184 | let inner = store.try_into_inner().unwrap();
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_inner`
|
= note: `-D unused-variables` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_variables)]`
|
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/
|