diff options
author | Laurențiu Nicola <[email protected]> | 2020-11-24 10:08:54 +0000 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2020-11-24 10:08:54 +0000 |
commit | 8af1ed6a09642d77a30aa90bf4f8958ed94f02c6 (patch) | |
tree | b8722c97d706ff709801256c52f0c29d3789bdbe /crates/assists/src/handlers/ignore_test.rs | |
parent | 6294286fee6e53c29e8ad563f476721ad85ef266 (diff) |
Avoid string allocations in ignore_test
Diffstat (limited to 'crates/assists/src/handlers/ignore_test.rs')
-rw-r--r-- | crates/assists/src/handlers/ignore_test.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/ignore_test.rs b/crates/assists/src/handlers/ignore_test.rs index 2b9dff081..5096a0005 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<()> | |||
56 | 56 | ||
57 | fn has_ignore_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> { | 57 | fn has_ignore_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> { |
58 | fn_def.attrs().find_map(|attr| { | 58 | fn_def.attrs().find_map(|attr| { |
59 | if attr.path()?.syntax().text().to_string() == "ignore" { | 59 | if attr.path()?.syntax().text() == "ignore" { |
60 | Some(attr) | 60 | Some(attr) |
61 | } else { | 61 | } else { |
62 | None | 62 | None |