manual_map

This commit is contained in:
Johann Hemmann 2024-01-19 14:06:12 +01:00
parent 60dda08266
commit d8ad4afce8
3 changed files with 2 additions and 9 deletions

View file

@ -4285,10 +4285,8 @@ impl Type {
// arg can be either a `Ty` or `constant`
if let Some(ty) = arg.ty(Interner) {
Some(format_smolstr!("{}", ty.display(db)))
} else if let Some(const_) = arg.constant(Interner) {
Some(format_smolstr!("{}", const_.display(db)))
} else {
None
arg.constant(Interner).map(|const_| format_smolstr!("{}", const_.display(db)))
}
})
}