new rustfmt and clippy

This commit is contained in:
Anton-4 2021-02-20 20:00:37 +01:00
parent dfaa280a88
commit b098d13407
4 changed files with 38 additions and 16 deletions

View file

@ -229,7 +229,11 @@ fn flatten<'a>(
tag_name,
layout,
} if union.alternatives.len() == 1
&& !matches!(layout, Layout::Union(UnionLayout::NullableWrapped { .. })| Layout::Union(UnionLayout::NullableUnwrapped { .. })) =>
&& !matches!(
layout,
Layout::Union(UnionLayout::NullableWrapped { .. })
| Layout::Union(UnionLayout::NullableUnwrapped { .. })
) =>
{
// TODO ^ do we need to check that guard.is_none() here?

View file

@ -643,7 +643,10 @@ impl<'a> Layout<'a> {
Union(variant) => {
use UnionLayout::*;
matches!(variant, Recursive(_)| NullableWrapped { .. } | NullableUnwrapped { .. })
matches!(
variant,
Recursive(_) | NullableWrapped { .. } | NullableUnwrapped { .. }
)
}
RecursivePointer => true,