]> git.lizzy.rs Git - rust.git/blobdiff - crates/ide/src/syntax_highlighting/format.rs
Merge #7353
[rust.git] / crates / ide / src / syntax_highlighting / format.rs
index 63bff6376f787c9f82dcf739b2d1b735c0788ef9..8c67a0863c1d55b2c1f5653e2afbb5bea12a8bbe 100644 (file)
@@ -31,7 +31,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;
     }