diff --git a/crates/ide/src/syntax_highlighting/html.rs b/crates/ide/src/syntax_highlighting/html.rs index 249368ff814..57e2d292312 100644 --- a/crates/ide/src/syntax_highlighting/html.rs +++ b/crates/ide/src/syntax_highlighting/html.rs @@ -2,6 +2,7 @@ use base_db::SourceDatabase; use oorandom::Rand32; +use stdx::format_to; use syntax::{AstNode, TextRange, TextSize}; use crate::{syntax_highlighting::highlight, FileId, RootDatabase}; @@ -40,7 +41,7 @@ pub(crate) fn highlight_as_html(db: &RootDatabase, file_id: FileId, rainbow: boo } _ => "".into(), }; - buf.push_str(&format!("{}", class, color, html_escape(curr))); + format_to!(buf, "{}", class, color, html_escape(curr)); prev_pos = range.range.end(); }