• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-bitcoin / rust-bitcoin / 8269012797
83%

Build:
DEFAULT BRANCH: master
Ran 13 Mar 2024 05:29PM UTC
Jobs 1
Files 88
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Mar 2024 05:28PM UTC coverage: 84.144% (+0.02%) from 84.12%
8269012797

push

github

apoelstra
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

Jobs
ID Job ID Ran Files Coverage
1 8269012797.1 13 Mar 2024 05:29PM UTC 0
84.14
GitHub Action Run
Source Files on build 8269012797
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #8269012797
  • 1ceac90b on github
  • Prev Build on master (#8268759758)
  • Next Build on master (#8276893111)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc