From e27af5fae3e44ebd2339c3dd3fcaa1e9b59de598 Mon Sep 17 00:00:00 2001 From: Dorian Scheidt Date: Thu, 18 Aug 2022 18:21:58 -0500 Subject: [PATCH] Reorder args with flip_comma --- crates/ide-assists/src/handlers/generate_function.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ide-assists/src/handlers/generate_function.rs b/crates/ide-assists/src/handlers/generate_function.rs index dee5fea2330..2283805a305 100644 --- a/crates/ide-assists/src/handlers/generate_function.rs +++ b/crates/ide-assists/src/handlers/generate_function.rs @@ -62,7 +62,7 @@ fn gen_fn(acc: &mut Assists, ctx: &AssistContext<'_>) -> Option<()> { let fn_name = &*name_ref.text(); let TargetInfo { target_module, adt_name, target, file, insert_offset } = - fn_target_info(path, ctx, &call, fn_name)?; + fn_target_info(ctx, path, &call, fn_name)?; let function_builder = FunctionBuilder::from_call(ctx, &call, fn_name, target_module, target)?; let text_range = call.syntax().text_range(); let label = format!("Generate {} function", function_builder.fn_name); @@ -87,8 +87,8 @@ struct TargetInfo { } fn fn_target_info( - path: ast::Path, ctx: &AssistContext<'_>, + path: ast::Path, call: &CallExpr, fn_name: &str, ) -> Option {