Skip to content

Commit

Permalink
Use .as_str() instead of CowStr::Borrowed
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Sep 14, 2020
1 parent f7983ca commit 6f2e1c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/markdown.rs
Expand Up @@ -934,7 +934,7 @@ impl Markdown<'_> {
if let Some(link) =
links.iter().find(|link| &*link.original_text == broken_link.reference)
{
Some((CowStr::Borrowed(&link.href), CowStr::Borrowed(&link.new_text)))
Some((link.href.as_str().into(), link.new_text.as_str().into()))
} else {
None
}
Expand Down Expand Up @@ -1014,7 +1014,7 @@ impl MarkdownSummaryLine<'_> {
if let Some(link) =
links.iter().find(|link| &*link.original_text == broken_link.reference)
{
Some((CowStr::Borrowed(&link.href), CowStr::Borrowed(&link.new_text)))
Some((link.href.as_str().into(), link.new_text.as_str().into()))
} else {
None
}
Expand Down

0 comments on commit 6f2e1c6

Please sign in to comment.