From 4d0cfc07fd917615a65241ec5e8f05415718f07f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 27 Aug 2020 15:02:56 +0200 Subject: Minor --- crates/ide/src/syntax_highlighting/html.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ide/src/syntax_highlighting/html.rs') diff --git a/crates/ide/src/syntax_highlighting/html.rs b/crates/ide/src/syntax_highlighting/html.rs index 249368ff8..57e2d2923 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(); } -- cgit v1.2.3