Skip to content

Commit

Permalink
Merge pull request #5701 from stacks-network/fix/clippy-ci-unnecessar…
Browse files Browse the repository at this point in the history
…y-unwrap

Fix clippy::unnecessary_unwrap throughout stacks core
  • Loading branch information
jferrant authored Jan 15, 2025
2 parents feb450f + 23ecad0 commit ab90a9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stackslib/src/burnchains/bitcoin/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,10 @@ impl BurnchainIndexer for BitcoinIndexer {
start_height: u64,
end_height: Option<u64>,
) -> Result<u64, burnchain_error> {
if end_height.is_some() && end_height <= Some(start_height) {
return Ok(end_height.unwrap());
if let Some(end_height) = end_height {
if end_height <= start_height {
return Ok(end_height);
}
}

let new_height = self
Expand Down

0 comments on commit ab90a9d

Please sign in to comment.