]> git.lizzy.rs Git - rust.git/commitdiff
condense matches on autolink
authorRaymond Luo <ray.luo@nyu.edu>
Thu, 23 Jun 2022 02:07:26 +0000 (22:07 -0400)
committerRaymond Luo <ray.luo@nyu.edu>
Thu, 23 Jun 2022 02:07:26 +0000 (22:07 -0400)
crates/ide/src/doc_links.rs

index 993e12f4a3e6e68da933f54c4caa9e8b2675b6c9..6932dd3ae222d7fade307c9da02c730f9549a445 100644 (file)
@@ -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()))
@@ -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()))