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}",),