Skip to content

Commit 6f6580d

Browse files
bors[bot]matklad
andauthored
Merge #5898
5898: Minor r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents e7da581 + 4d0cfc0 commit 6f6580d

File tree

1 file changed

+2
-1
lines changed
  • crates/ide/src/syntax_highlighting

1 file changed

+2
-1
lines changed

crates/ide/src/syntax_highlighting/html.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
use base_db::SourceDatabase;
44
use oorandom::Rand32;
5+
use stdx::format_to;
56
use syntax::{AstNode, TextRange, TextSize};
67

78
use crate::{syntax_highlighting::highlight, FileId, RootDatabase};
@@ -40,7 +41,7 @@ pub(crate) fn highlight_as_html(db: &RootDatabase, file_id: FileId, rainbow: boo
4041
}
4142
_ => "".into(),
4243
};
43-
buf.push_str(&format!("<span class=\"{}\"{}>{}</span>", class, color, html_escape(curr)));
44+
format_to!(buf, "<span class=\"{}\"{}>{}</span>", class, color, html_escape(curr));
4445

4546
prev_pos = range.range.end();
4647
}

0 commit comments

Comments
 (0)