fdt icon indicating copy to clipboard operation
fdt copied to clipboard

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

Open Property404 opened this issue 1 year ago • 4 comments

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

Property404 avatar Dec 16 '23 18:12 Property404

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 avatar May 02 '24 00:05 repnop

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

rmsyn avatar May 19 '24 05:05 rmsyn

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 avatar Jun 26 '24 03:06 repnop

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 :heart:

rmsyn avatar Jun 26 '24 23:06 rmsyn