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

rust-bitcoin / rust-bitcoin / 12694367970
83%

Build:
DEFAULT BRANCH: master
Ran 09 Jan 2025 04:37PM UTC
Jobs 1
Files 116
Run time 99min
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

09 Jan 2025 04:36PM UTC coverage: 82.929% (+0.02%) from 82.905%
12694367970

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#3858: Bound `Address` parsing on `NetworkValidationUnchecked`

<a class=hub.com/rust-bitcoin/rust-bitcoin/commit/29a71de92817bccd49b42b1055cc570832e6b959">29a71de92<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/9a8e61393c4b05caaa673efaa1e85bd272ed9ff5"> Bound Address parsing on NetworkValidationUnchecked (Tobin C. Harding)
<a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/cf455d3a063079916f0bff8ee0335cce00a50f8e">cf455d3a0</a> Fix typo in prifixes (Tobin C. Harding)

Pull request description:

  Currently it is not possible for downstream to use a generic on the `Address` type in structs in conjuncture with
  derives (`serde::Deserialize` and `Display`) because our impls are only done for `NetworkUnchecked` (as they should be).

  However, as observed by dpc, if we add a secondary marker trait and use it to bound the impls, implementing the new marker for `NetworkUnchecked` then downstream can use derives by way of

  ```
      #[derive(Serialize, Deserialize)]
      struct Foo<V>
          where V: NetworkValidation,
      {
          #[serde(bound(deserialize = "V: NetworkValidationUnchecked"))]
          address: Address<V>,
      }
  ```

  This is cool as hell because the `Address` type is currently a royal PITA.

  Patch 1 is trivial cleanup.

  To get past a build error in `FromStr` I used this little trick
  ```rust
              // We know that `U` is only ever `NetworkUnchecked` but the compiler does not.
              Ok(Address(address.0, PhantomData::<U>))
  ```

  Resolve: #3760
  and
  Close: #3856

ACKs for top commit:
  apoelstra:
    ACK 29a71de92817bccd49b42b1055cc570832e6b959; successfully ran local tests

Tree-SHA512: 7c158dddb82ce82630975743c56080f827e

35 of 38 new or added lines in 1 file covered. (92.11%)

20583 of 24820 relevant lines covered (82.93%)

17446.26 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12694367970.1 09 Jan 2025 04:37PM UTC 0
82.93
GitHub Action Run
Source Files on build 12694367970
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #12694367970
  • 9a8e6139 on github
  • Prev Build on master (#12693579110)
  • Next Build on master (#12696532953)
  • 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