Skip to content

Commit

Permalink
Update crates/ide-assists/src/handlers/move_format_string_arg.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
  • Loading branch information
kartva and Veykril committed Sep 12, 2022
1 parent fb5ae99 commit 54e9324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ide-assists/src/handlers/move_format_string_arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use syntax::{ast, AstNode, AstToken, NodeOrToken, SyntaxKind::COMMA, TextRange};

pub(crate) fn move_format_string_arg(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<()> {
let fmt_string = ctx.find_token_at_offset::<ast::String>()?;
let tt = fmt_string.syntax().parent_ancestors().find_map(ast::TokenTree::cast)?;
let tt = fmt_string.syntax().parent().and_then(ast::TokenTree::cast)?;

let expanded_t = ast::String::cast(
ctx.sema.descend_into_macros_with_kind_preference(fmt_string.syntax().clone()),
Expand Down

0 comments on commit 54e9324

Please sign in to comment.