Closed gorzell closed 3 years ago
Hi @gorzell , many thanks for your feedback! It is definitely better to use expect
instead. I should actually have no unwrap
or expect
at all in the code :) I will go ahead and change those unwraps to expect
instead, and at the same time will probably add a new method which will return a Result
instead (I think Prost DecodeError
has been made public again).
Sounds good, thanks for the quick response.
I've created a new release (0.3.0) that hopefully addresses this problem. It also deprecates pack
and unpack
in favour of try_pack
and try_unpack
.
Nice! I updated our code base, and removed the lint exception. We don't have exhaustive tests, but those that we do have seem to be working. Thanks again.
Thanks for taking the time to add support for this functionality. I was wondering if you would be willing to either use
expect
instead ofunwrap
in the generated code, or explicitly add the#[allow(clippy::unwrap_used)]
macro. We happen to have the "no unwrap" calls lint turned on (our thinking is that outside of tests,expect
is always better thanunwrap
) so the generated code was breaking our build.There is another work around where you can disable the lint for the entire module:
But that feels a bit heavy handed.