Don't use an untyped String for ActiveParam tracking

This commit is contained in:
Lukas Wirth 2021-03-20 23:22:09 +01:00
parent 5cc8ad0c4a
commit 38048c35d8
5 changed files with 44 additions and 24 deletions

View file

@ -23,7 +23,7 @@ pub(super) fn ra_fixture(
expanded: SyntaxToken,
) -> Option<()> {
let active_parameter = ActiveParameter::at_token(&sema, expanded)?;
if !active_parameter.name.starts_with("ra_fixture") {
if !active_parameter.ident().map_or(false, |name| name.text().starts_with("ra_fixture")) {
return None;
}
let value = literal.value()?;