Ran
|
Jobs
1
|
Files
88
|
Run time
1min
|
Badge
Embed ▾
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#2565: Removes txid prefix in transaction IDs <a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/56132f59d56782d200a9d5eec78336c1f5e55fec">56132f59d Remove the `:#` formatting for `hex_fmt_impl` macro (448 OG) Pull request description: This commit attempts to solve #2505 by ensuring that formatting is not forced using the `:#` in the hex macro code generating in macro rule `hex_fmt_impl` in the hashes/utils.rs file. The write! macro forces all formatting to add the prefix `0x` by adding an alternate by (#) default ```rust impl<$($gen: $gent),*> $crate::_export::_core::fmt::Debug for $ty<$($gen),*> { #[inline] fn fmt(&self, f: &mut $crate::_export::_core::fmt::Formatter) -> $crate::_export::_core::fmt::Result { write!(f, "{:#}", self) // <-- This is where the formatting is being forced. } } ``` By removing this formatting, the `:#` must be specified by the user in order for a prefix to be added. ```rust let outpoint = bitcoin::OutPoint::default(); println!("{:?}", &outpoint); println!("{:#?}", &outpoint); println!("{:#}", &outpoint); println!("{:x}", &outpoint.txid); // `{:#}` must be specified to pretty print with a prefix println!("{:#}", &outpoint.txid); dbg!(&outpoint); dbg!(&outpoint.txid); ``` The PR also adds testcase for this when running `cargo test` . ACKs for top commit: tcharding: ACK 56132f59d56782d200a9d5eec78336c1f5e55fec apoelstra: ACK 56132f59d56782d200a9d5eec78336c1f5e55fec Tree-SHA512: 9e4fc9f307ae3a82bb37587cc0c10d98ebc
18 of 18 new or added lines in 2 files covered. (100.0%)
19667 of 23373 relevant lines covered (84.14%)
16533.0 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 8269012797.1 | 88 |
84.14 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|