Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yaziciahmet committed Aug 12, 2024
1 parent f56a9d5 commit 22a0481
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions crates/bitcoin-da/src/spec/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ impl BorshDeserialize for BitcoinHeaderWrapper {
#[inline]
fn deserialize_reader<R: borsh::io::Read>(reader: &mut R) -> borsh::io::Result<Self> {
let mut buf = vec![];
reader.read(&mut buf).expect("Borsh reader should never fail");
reader
.read(&mut buf)
.expect("Borsh reader should never fail");

let header = Decodable::consensus_decode(&mut &*buf)
.expect("Bitcoin Header deserialization cannot fail");
Expand All @@ -113,4 +115,4 @@ impl From<BitcoinHeader> for BitcoinHeaderWrapper {
fn from(header: BitcoinHeader) -> Self {
Self { header }
}
}
}
6 changes: 4 additions & 2 deletions crates/bitcoin-da/src/spec/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ impl BorshDeserialize for TransactionWrapper {
#[inline]
fn deserialize_reader<R: borsh::io::Read>(reader: &mut R) -> borsh::io::Result<Self> {
let mut buf = vec![];
reader.read(&mut buf).expect("Borsh reader should never fail");
reader
.read(&mut buf)
.expect("Borsh reader should never fail");

let tx = Decodable::consensus_decode(&mut &*buf)
.expect("Bitcoin Transaction deserialization cannot fail");
Expand All @@ -71,4 +73,4 @@ impl From<BitcoinTransaction> for TransactionWrapper {
fn from(tx: BitcoinTransaction) -> Self {
Self { tx }
}
}
}

0 comments on commit 22a0481

Please sign in to comment.