Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
| -rw-r--r-- | crates/hir/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 8e0b0ff6ad..501f262249 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -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))) } }) } |