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

rust-bitcoin / rust-bitcoin / 13992036628

21 Mar 2025 12:45PM UTC coverage: 83.173% (+0.06%) from 83.118%
13992036628

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#4200: Remove a bunch of `try_into().expect()`

<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/437562e71cbb1e18179df3f5d01d2cc86961a150">437562e71<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/6620a298f1b67af917c6e125dba9c11f26c38a48"> Add official BIP32 test vectors for invalid keys (Martin Habovstiak)
<a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/5dd0c9253d207facc954a9b7f30ec7b2a7f410d8">5dd0c9253</a> Remove a bunch of `try_into().expect()` (Martin Habovstiak)

Pull request description:

  Previously we've used `try_into().expect()` because const generics wer
  unavailable. Then they become available but we didn't realize we could
  already convert a bunch of code to not use panicking conversions. But we
  can (and could for a while).

  This adds an extension trait for arrays to provide basic non-panicking
  operations retutning arrays, so they can be composed with other
  functions accepting arrays without any conversions. It also refactors a
  bunch of code to use the non-panicking constructs but it's certainly not
  all of it. That could be done later. This just aims at removing the
  ugliest offenders and demonstrate the usefulness of this approach.

ACKs for top commit:
  tcharding:
    ACK 437562e71cbb1e18179df3f5d01d2cc86961a150
  apoelstra:
    ACK 437562e71cbb1e18179df3f5d01d2cc86961a150; successfully ran local tests

Tree-SHA512: 51384dd2e0f4caee29caa6406eab5cf64e8

161 of 189 new or added lines in 13 files covered. (85.19%)

4 existing lines in 2 files now uncovered.

22030 of 26487 relevant lines covered (83.17%)

16868.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.92
/internals/src/array.rs


Source Not Available

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