Skip to content

Commit

Permalink
remove redudant .as_ref() call
Browse files Browse the repository at this point in the history
  • Loading branch information
orpuente-MS committed Jan 17, 2025
1 parent d9e6a40 commit 0823635
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions language_service/src/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,19 +362,15 @@ 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(
&param_doc,
format!("parameter of `{callable_name}`\n{markdown}",),
)
}
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(
&param_doc,
format!("type parameter of `{callable_name}`\n{markdown}",),
Expand Down

0 comments on commit 0823635

Please sign in to comment.