-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust API: Expose RecordingStreamError
#3735
Comments
Good catch! There really should be some compiler setting to catch this mistake 🤔 |
https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#unreachable-pub |
Oh, and I could write a PR for this if you like — just let me know whether the enum should be wrapped to be hidden or not as I mentioned above. |
unreachable-pub does something else - it checks that everything marked |
Let's just make |
I found the bug that prevents |
That rule already exists and is mandatory. If you remove
Done: #3786 |
* Closes #3735 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3777) (if applicable) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/3777) - [Docs preview](https://rerun.io/preview/a7dd4dce56f3fec82e3ab5e38c1f3f38606e249c/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/a7dd4dce56f3fec82e3ab5e38c1f3f38606e249c/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
Describe the annoyance
My preferred coding style is to never use type aliases for
std::result::Result
(such asrerun::RecordingStreamResult
), but the typeRecordingStreamError
is private. Rust libraries typically make their error types public even if they also offer aResult
.This lack of public type might also make it impossible to pass the error through some generic error-handling code that required the error type to be named, but I don't have a practical example of that.
Please make
RecordingStreamError
public (possibly as a struct wrapper if you wish to avoid revealing the enum variants).Additional context
rerun 0.9.0
The text was updated successfully, but these errors were encountered: