lurk-rs
lurk-rs copied to clipboard
Potential unintentional panics in the codebase
The command cargo clippy -- -D 'clippy::panic_in_result_fn will reveal several instances of panics occurring within a block returning a result.
Some of there are warranted and unrecoverable (e.g. unreachable! in eval, or assert! instances in many cases). Some are probably not warranted and could probably be recovered (e.g. some instances of .unwrap in src/writer.rs's Write<F> for Expression<F> [^1]).
In the later case, we should fold the error management within the error case of the Result.
[^1]: see also cargo clippy --fix -- -D 'clippy::unwrap_in_result'
Hi team, Can I work on this issue?
In the later case, we should fold the error management within the error case of the
Result.
This means we will change 'unwrap' and 'expect' to Err in the functions found by cargo clippy --fix -- -D 'clippy::unwrap_in_result'.
Thank you!
Sure, go for it 👍🏼