mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Avoid string allocations in ignore_test
This commit is contained in:
parent
6294286fee
commit
8af1ed6a09
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ pub(crate) fn ignore_test(acc: &mut Assists, ctx: &AssistContext) -> Option<()>
|
||||||
|
|
||||||
fn has_ignore_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> {
|
fn has_ignore_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> {
|
||||||
fn_def.attrs().find_map(|attr| {
|
fn_def.attrs().find_map(|attr| {
|
||||||
if attr.path()?.syntax().text().to_string() == "ignore" {
|
if attr.path()?.syntax().text() == "ignore" {
|
||||||
Some(attr)
|
Some(attr)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
Loading…
Reference in a new issue