Closed
Description
If you match on Err(_)
then it triggers the match_wild_err_arm
lint and clippy tells you to match on each error individually, but if you match on Err(_e)
it doesn't trigger at all, even though that's ignoring all possible errors just the same.
Code that brought this up
#[inline]
#[must_use]
pub fn from_array_len(data: A, len: usize) -> Self {
match Self::try_from_array_len(data, len) {
Ok(out) => out,
Err(_) => {
panic!("ArrayishVec: length {} exceeds capacity {}!", len, A::CAPACITY)
}
}
}
- This should probably only trigger on enum errors, not struct errors.
- Using a name other than
_
will still match on everything, which is what this lint theoretically doesn't link, so alternate names should also still trigger the lint