tests: Just use unwrap()#384
Conversation
I don't think this unique-to-us `t!` macro is gaining anything really over just calling `unwrap()` directly which is *way* more widely used and idiomatic. I only converted a few testing functions to start momentum and hopefully new code can avoid `t!`. Signed-off-by: Colin Walters <walters@verbum.org>
|
Heh if you're curious for the backstory on this: long ago we had |
|
That makes total sense, I am definitely aware of the age of the crate. I actually started learning Rust in the age of Actually of potential interest to you and also topically relevant for future directions of this crate: I remember skimming through the source code of this crate at the time thinking "what does a tar parser in Rust look like" and being quite surprised at the usage of I now know enough to understand that technically today we could rewrite it with just slicing a Any opinions on adding a dep on say zerocopy and adding |
|
Heh good point! Agreed it would be best to remove all the My only hesitation on zerocopy itself (I don't have a ton of experience with it prior) is that it looks like it's got major version bumps every so often. That would likely become a public dependency of the |
I don't think this unique-to-us
t!macro is gaining anything really over just callingunwrap()directly which is way more widely used and idiomatic.I only converted a few testing functions to start momentum and hopefully new code can avoid
t!.