Skip to content

IBC Hooks: add hooks to call bridge escrow program #1810

IBC Hooks: add hooks to call bridge escrow program

IBC Hooks: add hooks to call bridge escrow program #1810

GitHub Actions / clippy failed Oct 24, 2024 in 0s

clippy

8 errors

Details

Results

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

Versions

  • rustc 1.78.0-nightly (268dbbbc4 2024-02-04)
  • cargo 1.78.0-nightly (7bb7b5395 2024-01-20)
  • clippy 0.1.77 (268dbbb 2024-02-04)

Annotations

Check failure on line 241 in solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

error: unneeded `return` statement
   --> solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs:239:21
    |
239 | /                     return ibc::AcknowledgementStatus::error(
240 | |                         ibc::TokenTransferError::Other(err.to_string()).into(),
241 | |                     );
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = note: `-D clippy::needless-return` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
    |
239 ~                     ibc::AcknowledgementStatus::error(
240 +                         ibc::TokenTransferError::Other(err.to_string()).into(),
241 ~                     )
    |

Check failure on line 218 in solana/solana-ibc/programs/solana-ibc/src/transfer/mod.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/transfer/mod.rs:218:52
    |
218 |                 instruction_data.extend_from_slice(&intent_id.as_bytes());
    |                                                    ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `intent_id.as_bytes()`
    |
    = 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 214 in solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `ibc::core::channel::types::acknowledgement::AcknowledgementStatus`

error: useless conversion to the same type: `ibc::core::channel::types::acknowledgement::AcknowledgementStatus`
   --> solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs:208:21
    |
208 | /                     ibc::AcknowledgementStatus::error(
209 | |                         ibc::TokenTransferError::Other(
210 | |                             "Invalid memo".to_string(),
211 | |                         )
212 | |                         .into(),
213 | |                     )
214 | |                     .into(),
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
    |
208 ~                     ibc::AcknowledgementStatus::error(
209 +                         ibc::TokenTransferError::Other(
210 +                             "Invalid memo".to_string(),
211 +                         )
212 +                         .into(),
213 ~                     ),
    |

Check failure on line 207 in solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `ix_data.get(0)`

error: accessing first element with `ix_data.get(0)`
   --> solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs:207:33
    |
207 |                 let intent_id = ix_data.get(0).ok_or(
    |                                 ^^^^^^^^^^^^^^ help: try: `ix_data.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `-D clippy::get-first` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::get_first)]`

Check failure on line 204 in solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

single-character string constant used as pattern

error: single-character string constant used as pattern
   --> solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs:204:41
    |
204 |                 let values = rest.split(",").collect::<Vec<&str>>();
    |                                         ^^^ help: consider using a `char`: `','`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern

Check failure on line 197 in solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `ibc::core::channel::types::acknowledgement::AcknowledgementStatus`

error: useless conversion to the same type: `ibc::core::channel::types::acknowledgement::AcknowledgementStatus`
   --> solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs:191:21
    |
191 | /                     ibc::AcknowledgementStatus::error(
192 | |                         ibc::TokenTransferError::Other(
193 | |                             "Invalid memo".to_string(),
194 | |                         )
195 | |                         .into(),
196 | |                     )
197 | |                     .into(),
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
    |
191 ~                     ibc::AcknowledgementStatus::error(
192 +                         ibc::TokenTransferError::Other(
193 +                             "Invalid memo".to_string(),
194 +                         )
195 +                         .into(),
196 ~                     ),
    |

Check failure on line 190 in solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

single-character string constant used as pattern

error: single-character string constant used as pattern
   --> solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs:190:61
    |
190 |                 let (accounts_size, rest) = memo.split_once(",").ok_or(
    |                                                             ^^^ help: consider using a `char`: `','`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
    = note: `-D clippy::single-char-pattern` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::single_char_pattern)]`

Check failure on line 179 in solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless conversion to the same type: `ibc::core::channel::types::acknowledgement::AcknowledgementStatus`

error: useless conversion to the same type: `ibc::core::channel::types::acknowledgement::AcknowledgementStatus`
   --> solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs:175:32
    |
175 |                       return Err(ibc::AcknowledgementStatus::error(
    |  ________________________________^
176 | |                         ibc::TokenTransferError::PacketDataDeserialization
177 | |                             .into(),
178 | |                     )
179 | |                     .into());
    | |___________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `-D clippy::useless-conversion` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_conversion)]`
help: consider removing `.into()`
    |
175 ~                     return Err(ibc::AcknowledgementStatus::error(
176 +                         ibc::TokenTransferError::PacketDataDeserialization
177 +                             .into(),
178 ~                     ));
    |