Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`crates/acap-vapix/src/ajr_http2.rs`: - Use enum for public error type to get some experience with this design even though I think an opaque struct would be more appropriate for an error that will change. - Implement `From<url::ParseError>` is not implemented because I think it is less obvious how it should be mapped, so I prefer making it explicit to avoid surprises and relieve readers of having to look it up. `crates/acap-vapix/src/http.rs`: - Use an opaque error type because there are many ways that requests can go wrong when crossing a network, and I expect more will be explicitly addressed as usage grows. At the same time I don't want to expose the underlying `reqwest` errors directly because I want to eventually offer support for `curl` and I don't want users to have to think about in which underlying library the error originates, and to depend on these libraries directly in order to handle errors. - Use `assert!` instead of `debug_assert!` because most test coverage comes from me using the tools that use this library, and and I want to continue installing them with the default profile, which afaik is the release profile. But I don't think anything terrible will go wrong if this assumption does not hold, so long term it is probably excessive to crash the program if it does not.
- Loading branch information