Skip to content

solana-ibc: use solana height and timestamp for cf-guest host metadata #1781

solana-ibc: use solana height and timestamp for cf-guest host metadata

solana-ibc: use solana height and timestamp for cf-guest host metadata #1781

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

clippy

2 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 2
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 87 in solana/solana-ibc/programs/solana-ibc/src/validation_context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unreachable statement

error: unreachable statement
  --> solana/solana-ibc/programs/solana-ibc/src/validation_context.rs:87:9
   |
79 | /             return ibc::Timestamp::from_nanoseconds(
80 | |                 timestamp_sec * 10u64.pow(9),
81 | |             )
82 | |             .map_err(|e| {
83 | |                 ibc::ClientError::ClientSpecific { description: e.to_string() }
84 | |                     .into()
85 | |             });
   | |______________- any code following this expression is unreachable
86 |           }
87 |           let timestamp = self.borrow().chain.head()?.timestamp_ns.get();
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement

Check failure on line 64 in solana/solana-ibc/programs/solana-ibc/src/validation_context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unreachable statement

error: unreachable statement
  --> solana/solana-ibc/programs/solana-ibc/src/validation_context.rs:64:9
   |
62 |             return Ok(height);
   |             ----------------- any code following this expression is unreachable
63 |         }
64 |         let height = u64::from(self.borrow().chain.head()?.block_height);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
   |
   = note: `-D unreachable-code` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unreachable_code)]`