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

rust-bitcoin / rust-bitcoin / 9159332463
83%

Build:
DEFAULT BRANCH: master
Ran 20 May 2024 01:18PM UTC
Jobs 1
Files 92
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

20 May 2024 01:17PM UTC coverage: 83.318%. Remained the same
9159332463

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#2520: policy: Introduce error type re-export policy

<a class=hub.com/rust-bitcoin/rust-bitcoin/commit/7de02da9f5f7223c08c353acd90cbe04968a9776">7de02da9f policy: Introduce error type re-export policy (Tobin C. Harding)

Pull request description:

  We have started introducing `error` sub-modules for modules that have a lot of error code. This is mainly a code organisation thing.

  When importing a function it is annoying to have to go to another module to get the returned error type. Furthermore it leaks our module structure and introduces a maintenance burden because for modules that do not [yet] have an `error` sub-module the error types are in a different place to modules that do have an `error` sub-module.

  Furthermore, if function users have to go to the `error` sub-module to read docs etc. they are bombarded with all the hider errors as well (see definitions below).

  We can solve both problems by re-exporting all regular errors, making the `error` sub-module public (for niche users), and not re-exporting hider errors.

  I believe the re-export should only be done in the module that holds `error` sub-module i.e., do not re-export `foo::error::SomeError` from `bar` module even if `bar::some_function` returns `SomeError`.

  Definitions:

  - hider error: An error type, often a struct, that is nested in another error just to hide the internals.
  - regular error: An error type that is returned from a public function, most often an enum.

  Please note that some times errors act as both hider errors and regular errors so the definitions are not perfect.

ACKs for top commit:
  apoelstra:
    ACK 7de02da9f5f7223c08c353acd90cbe04968a9776 LGTM

Tree-SHA512: 42b9d9b787f1b9b921bf2104b01c562af4a

19303 of 23168 relevant lines covered (83.32%)

16627.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9159332463.1 20 May 2024 01:18PM UTC 0
83.32
GitHub Action Run
Source Files on build 9159332463
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #9159332463
  • dbf0ac8e on github
  • Prev Build on master (#9140576113)
  • Next Build on master (#9159756641)
  • 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