Run the formatter

I don't want to wait for the bot, just run the formatter now.

No manual changes.
This commit is contained in:
Tobin C. Harding 2024-07-11 11:21:53 +10:00
parent 0511f44d99
commit 40bee24de7
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
2 changed files with 8 additions and 5 deletions

View File

@ -166,7 +166,7 @@ impl Decodable for HeaderAndShortIds {
header: Decodable::consensus_decode(r)?,
nonce: Decodable::consensus_decode(r)?,
short_ids: Decodable::consensus_decode(r)?,
prefilled_txs: Decodable::consensus_decode(r)?
prefilled_txs: Decodable::consensus_decode(r)?,
};
match header_short_ids.short_ids.len().checked_add(header_short_ids.prefilled_txs.len()) {
Some(x) if x <= u16::MAX.into() => Ok(header_short_ids),
@ -244,8 +244,10 @@ impl HeaderAndShortIds {
});
} else {
match version {
1 => short_ids.push(ShortId::with_siphash_keys(&tx.compute_txid(), siphash_keys)),
2 => short_ids.push(ShortId::with_siphash_keys(&tx.compute_wtxid(), siphash_keys)),
1 =>
short_ids.push(ShortId::with_siphash_keys(&tx.compute_txid(), siphash_keys)),
2 => short_ids
.push(ShortId::with_siphash_keys(&tx.compute_wtxid(), siphash_keys)),
_ => unreachable!(),
}
}

View File

@ -3,7 +3,7 @@
//! Provides [`Height`] and [`Time`] types used by the `rust-bitcoin` `absolute::LockTime` type.
#[cfg(feature = "alloc")]
use alloc::{string::String, boxed::Box};
use alloc::{boxed::Box, string::String};
use core::fmt;
use internals::write_err;
@ -372,10 +372,11 @@ impl From<ConversionError> for ParseError {
#[cfg(test)]
mod tests {
use super::*;
#[cfg(feature = "serde")]
use internals::serde_round_trip;
use super::*;
#[test]
fn time_from_str_hex_happy_path() {
let actual = Time::from_hex("0x6289C350").unwrap();