Skip to content

Commit 60156ca

Browse files
Update src/librustdoc/clean/types.rs: use matches!
Co-authored-by: Guillaume Gomez <[email protected]>
1 parent 047a70f commit 60156ca

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/librustdoc/clean/types.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,11 +1534,7 @@ impl Type {
15341534
}
15351535

15361536
fn is_type_alias(&self) -> bool {
1537-
if let Type::Path { path: Path { res: Res::Def(DefKind::TyAlias, _), .. } } = &self {
1538-
true
1539-
} else {
1540-
false
1541-
}
1537+
matches!(self, Type::Path { path: Path { res: Res::Def(DefKind::TyAlias, _), .. } })
15421538
}
15431539

15441540
/// Check if two types are "the same" for documentation purposes.

0 commit comments

Comments
 (0)