Skip to content

Commit

Permalink
condense matches on autolink
Browse files Browse the repository at this point in the history
  • Loading branch information
erhuve committed Jun 23, 2022
1 parent b7e3f52 commit 96ff235
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ide/src/doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ fn map_links<'e>(
let (link_type, link_target_s, link_name) =
callback(&end_link_target.take().unwrap(), &s);
end_link_target = Some(CowStr::Boxed(link_target_s.into()));
if !matches!(end_link_type, Some(link) if link == LinkType::Autolink) {
if !matches!(end_link_type, Some(LinkType::Autolink)) {
end_link_type = link_type;
}
Event::Text(CowStr::Boxed(link_name.into()))
Expand All @@ -394,7 +394,7 @@ fn map_links<'e>(
let (link_type, link_target_s, link_name) =
callback(&end_link_target.take().unwrap(), &s);
end_link_target = Some(CowStr::Boxed(link_target_s.into()));
if !matches!(end_link_type, Some(link) if link == LinkType::Autolink) {
if !matches!(end_link_type, Some(LinkType::Autolink)) {
end_link_type = link_type;
}
Event::Code(CowStr::Boxed(link_name.into()))
Expand Down

0 comments on commit 96ff235

Please sign in to comment.