mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 06:23:25 +00:00
Auto merge of #16159 - Waqar144:work/simplify, r=Veykril
minor: use a single push_str instead of 2 push
This commit is contained in:
commit
f1d09c9c7c
1 changed files with 1 additions and 4 deletions
|
@ -13,10 +13,7 @@ pub(crate) fn remove_markdown(markdown: &str) -> String {
|
||||||
Event::Text(text) | Event::Code(text) => out.push_str(&text),
|
Event::Text(text) | Event::Code(text) => out.push_str(&text),
|
||||||
Event::SoftBreak => out.push(' '),
|
Event::SoftBreak => out.push(' '),
|
||||||
Event::HardBreak | Event::Rule | Event::End(Tag::CodeBlock(_)) => out.push('\n'),
|
Event::HardBreak | Event::Rule | Event::End(Tag::CodeBlock(_)) => out.push('\n'),
|
||||||
Event::End(Tag::Paragraph) => {
|
Event::End(Tag::Paragraph) => out.push_str("\n\n"),
|
||||||
out.push('\n');
|
|
||||||
out.push('\n');
|
|
||||||
}
|
|
||||||
Event::Start(_)
|
Event::Start(_)
|
||||||
| Event::End(_)
|
| Event::End(_)
|
||||||
| Event::Html(_)
|
| Event::Html(_)
|
||||||
|
|
Loading…
Reference in a new issue