From 46b4f89c920c314caf1a8af2abdb09732d100d67 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Jan 2021 01:56:11 +0300 Subject: . --- crates/ide/src/syntax_highlighting/format.rs | 2 +- crates/ide/src/syntax_highlighting/inject.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ide/src/syntax_highlighting') diff --git a/crates/ide/src/syntax_highlighting/format.rs b/crates/ide/src/syntax_highlighting/format.rs index a74ca844b..8a9b5ca8c 100644 --- a/crates/ide/src/syntax_highlighting/format.rs +++ b/crates/ide/src/syntax_highlighting/format.rs @@ -30,7 +30,7 @@ fn is_format_string(string: &ast::String) -> Option<()> { let parent = string.syntax().parent(); let name = parent.parent().and_then(ast::MacroCall::cast)?.path()?.segment()?.name_ref()?; - if !matches!(name.text().as_str(), "format_args" | "format_args_nl") { + if !matches!(name.text(), "format_args" | "format_args_nl") { return None; } diff --git a/crates/ide/src/syntax_highlighting/inject.rs b/crates/ide/src/syntax_highlighting/inject.rs index 281461493..8cdc3688f 100644 --- a/crates/ide/src/syntax_highlighting/inject.rs +++ b/crates/ide/src/syntax_highlighting/inject.rs @@ -116,7 +116,7 @@ pub(super) fn doc_comment(hl: &mut Highlights, node: &SyntaxNode) { None => (), } - let line: &str = comment.text().as_str(); + let line: &str = comment.text(); let range = comment.syntax().text_range(); let mut pos = TextSize::of(comment.prefix()); -- cgit v1.2.3