Skip to content
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

Remove unwrap's/expect's in favor of propagating up errors #23

Open
Property404 opened this issue Dec 16, 2023 · 4 comments
Open

Remove unwrap's/expect's in favor of propagating up errors #23

Property404 opened this issue Dec 16, 2023 · 4 comments
Labels
breaking change Requires a major version bump or compatibility API to be introduced enhancement New feature or request planned Planned feature request or change
Milestone

Comments

@Property404
Copy link
Contributor

Property404 commented Dec 16, 2023

I think it would be nice to get rid of some of these panics in favor of propagating up errors

@Property404 Property404 changed the title Too many unwrap's/expect's/ok's Too many unwrap's/expect's Dec 16, 2023
@Property404 Property404 changed the title Too many unwrap's/expect's Remove unwrap's/expect's in favor of propagating up errors Dec 16, 2023
@repnop
Copy link
Owner

repnop commented May 2, 2024

This is actually one of the main purposes of the rewrite of the crate that I started a few months ago, though I'm unsure of when it'll be released, but this is planned!

@repnop repnop added enhancement New feature or request breaking change Requires a major version bump or compatibility API to be introduced planned Planned feature request or change labels May 2, 2024
@rmsyn
Copy link
Contributor

rmsyn commented May 19, 2024

I've done the work in my fork, if you want to crib some stuff: https://codeberg.org/weathered-steel/flat_device_tree/pulls/12/files

@repnop
Copy link
Owner

repnop commented Jun 26, 2024

I've made some good headway on the rewrite branch which uses GATs to implement a "panic mode" parameter which allows for both APIs to exist simultaneously without duplication. not sure on an ETA for a alpha release of the crate but this should help both support users who don't want to panic at all and those who would rather have a more ergonomic API in exchange for potential panics.

@repnop repnop added this to the v0.2.0 milestone Jun 26, 2024
@rmsyn
Copy link
Contributor

rmsyn commented Jun 26, 2024

not sure on an ETA for a alpha release of the crate but this should help both support users who don't want to panic at all and those who would rather have a more ergonomic API in exchange for potential panics.

Let me know when you have something ready for review.

I'm definitely interested to see what you worked out, since this is relevant to other projects I'm currently working on.

Thanks for the update ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Requires a major version bump or compatibility API to be introduced enhancement New feature or request planned Planned feature request or change
Projects
None yet
Development

No branches or pull requests

3 participants