Skip to content

Commit fd11eee

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

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/librustdoc/clean/types.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1534,12 +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-
}
1542-
}
1537+
matches!(self, Type::Path { path: Path { res: Res::Def(DefKind::TyAlias, _), .. } })
15431538

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

0 commit comments

Comments
 (0)