removed double map

This commit is contained in:
Jeroen Vannevel 2022-02-15 19:37:24 +00:00
parent f083c86890
commit 794105c18b
No known key found for this signature in database
GPG Key ID: 78EF5F52F38C49BD

View File

@ -192,10 +192,9 @@ pub fn from_ast(ctx: &LowerCtx, node: ast::Type) -> Self {
}
pl.params()
.map(|p| (p.pat(), p.ty()))
.map(|it| {
let type_ref = TypeRef::from_ast_opt(ctx, it.1);
let name = match it.0 {
let type_ref = TypeRef::from_ast_opt(ctx, it.ty());
let name = match it.pat() {
Some(ast::Pat::IdentPat(it)) => Some(
it.name().map(|nr| nr.as_name()).unwrap_or_else(Name::missing),
),