From 0823635df7ffcf3f600564cb5414e1eb64a45ade Mon Sep 17 00:00:00 2001 From: Oscar Puente <156957451+orpuente-MS@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:59:25 -0800 Subject: [PATCH] remove redudant `.as_ref()` call --- language_service/src/hover.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/language_service/src/hover.rs b/language_service/src/hover.rs index 8eabba17b0..2c52e1b5e8 100644 --- a/language_service/src/hover.rs +++ b/language_service/src/hover.rs @@ -362,9 +362,7 @@ fn display_local( match param_kind { LocalKind::Param => { let param_doc = parse_doc_for_param(callable_doc, local_name); - let callable_name = callable_name - .as_ref() - .expect("param should have a callable name"); + let callable_name = callable_name.expect("param should have a callable name"); with_doc( ¶m_doc, format!("parameter of `{callable_name}`\n{markdown}",), @@ -372,9 +370,7 @@ fn display_local( } LocalKind::TypeParam => { let param_doc = parse_doc_for_param(callable_doc, local_name); - let callable_name = callable_name - .as_ref() - .expect("type param should have a callable name"); + let callable_name = callable_name.expect("type param should have a callable name"); with_doc( ¶m_doc, format!("type parameter of `{callable_name}`\n{markdown}",),