|
Ran
|
Jobs
1
|
Files
92
|
Run time
1min
|
Badge
README BADGES
|
push
github
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
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 9159332463.1 | 0 |
83.32 |
GitHub Action Run |