Skip to content

Commit 6f2e1c6

Browse files
committed
Use .as_str() instead of CowStr::Borrowed
1 parent f7983ca commit 6f2e1c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/html/markdown.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ impl Markdown<'_> {
934934
if let Some(link) =
935935
links.iter().find(|link| &*link.original_text == broken_link.reference)
936936
{
937-
Some((CowStr::Borrowed(&link.href), CowStr::Borrowed(&link.new_text)))
937+
Some((link.href.as_str().into(), link.new_text.as_str().into()))
938938
} else {
939939
None
940940
}
@@ -1014,7 +1014,7 @@ impl MarkdownSummaryLine<'_> {
10141014
if let Some(link) =
10151015
links.iter().find(|link| &*link.original_text == broken_link.reference)
10161016
{
1017-
Some((CowStr::Borrowed(&link.href), CowStr::Borrowed(&link.new_text)))
1017+
Some((link.href.as_str().into(), link.new_text.as_str().into()))
10181018
} else {
10191019
None
10201020
}

0 commit comments

Comments
 (0)