From 8af1ed6a09642d77a30aa90bf4f8958ed94f02c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Tue, 24 Nov 2020 12:08:54 +0200 Subject: [PATCH] Avoid string allocations in ignore_test --- crates/assists/src/handlers/ignore_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/assists/src/handlers/ignore_test.rs b/crates/assists/src/handlers/ignore_test.rs index 2b9dff081f..5096a00058 100644 --- a/crates/assists/src/handlers/ignore_test.rs +++ b/crates/assists/src/handlers/ignore_test.rs @@ -56,7 +56,7 @@ pub(crate) fn ignore_test(acc: &mut Assists, ctx: &AssistContext) -> Option<()> fn has_ignore_attribute(fn_def: &ast::Fn) -> Option { fn_def.attrs().find_map(|attr| { - if attr.path()?.syntax().text().to_string() == "ignore" { + if attr.path()?.syntax().text() == "ignore" { Some(attr) } else { None