@@ -23,7 +23,7 @@ use crate::{Assist, AssistCtx, AssistId};
2323// (1 + 2) * 4;
2424// }
2525// ```
26- pub ( crate ) fn inline_local_varialbe ( ctx : AssistCtx < impl HirDatabase > ) -> Option < Assist > {
26+ pub ( crate ) fn inline_local_variable ( ctx : AssistCtx < impl HirDatabase > ) -> Option < Assist > {
2727 let let_stmt = ctx. find_node_at_offset :: < ast:: LetStmt > ( ) ?;
2828 let bind_pat = match let_stmt. pat ( ) ? {
2929 ast:: Pat :: BindPat ( pat) => pat,
@@ -117,7 +117,7 @@ mod tests {
117117 #[ test]
118118 fn test_inline_let_bind_literal_expr ( ) {
119119 check_assist (
120- inline_local_varialbe ,
120+ inline_local_variable ,
121121 "
122122fn bar(a: usize) {}
123123fn foo() {
@@ -151,7 +151,7 @@ fn foo() {
151151 #[ test]
152152 fn test_inline_let_bind_bin_expr ( ) {
153153 check_assist (
154- inline_local_varialbe ,
154+ inline_local_variable ,
155155 "
156156fn bar(a: usize) {}
157157fn foo() {
@@ -185,7 +185,7 @@ fn foo() {
185185 #[ test]
186186 fn test_inline_let_bind_function_call_expr ( ) {
187187 check_assist (
188- inline_local_varialbe ,
188+ inline_local_variable ,
189189 "
190190fn bar(a: usize) {}
191191fn foo() {
@@ -219,7 +219,7 @@ fn foo() {
219219 #[ test]
220220 fn test_inline_let_bind_cast_expr ( ) {
221221 check_assist (
222- inline_local_varialbe ,
222+ inline_local_variable ,
223223 "
224224fn bar(a: usize): usize { a }
225225fn foo() {
@@ -253,7 +253,7 @@ fn foo() {
253253 #[ test]
254254 fn test_inline_let_bind_block_expr ( ) {
255255 check_assist (
256- inline_local_varialbe ,
256+ inline_local_variable ,
257257 "
258258fn foo() {
259259 let a<|> = { 10 + 1 };
@@ -285,7 +285,7 @@ fn foo() {
285285 #[ test]
286286 fn test_inline_let_bind_paren_expr ( ) {
287287 check_assist (
288- inline_local_varialbe ,
288+ inline_local_variable ,
289289 "
290290fn foo() {
291291 let a<|> = ( 10 + 1 );
@@ -317,7 +317,7 @@ fn foo() {
317317 #[ test]
318318 fn test_not_inline_mut_variable ( ) {
319319 check_assist_not_applicable (
320- inline_local_varialbe ,
320+ inline_local_variable ,
321321 "
322322fn foo() {
323323 let mut a<|> = 1 + 1;
@@ -329,7 +329,7 @@ fn foo() {
329329 #[ test]
330330 fn test_call_expr ( ) {
331331 check_assist (
332- inline_local_varialbe ,
332+ inline_local_variable ,
333333 "
334334fn foo() {
335335 let a<|> = bar(10 + 1);
@@ -347,7 +347,7 @@ fn foo() {
347347 #[ test]
348348 fn test_index_expr ( ) {
349349 check_assist (
350- inline_local_varialbe ,
350+ inline_local_variable ,
351351 "
352352fn foo() {
353353 let x = vec![1, 2, 3];
@@ -367,7 +367,7 @@ fn foo() {
367367 #[ test]
368368 fn test_method_call_expr ( ) {
369369 check_assist (
370- inline_local_varialbe ,
370+ inline_local_variable ,
371371 "
372372fn foo() {
373373 let bar = vec![1];
@@ -387,7 +387,7 @@ fn foo() {
387387 #[ test]
388388 fn test_field_expr ( ) {
389389 check_assist (
390- inline_local_varialbe ,
390+ inline_local_variable ,
391391 "
392392struct Bar {
393393 foo: usize
@@ -415,7 +415,7 @@ fn foo() {
415415 #[ test]
416416 fn test_try_expr ( ) {
417417 check_assist (
418- inline_local_varialbe ,
418+ inline_local_variable ,
419419 "
420420fn foo() -> Option<usize> {
421421 let bar = Some(1);
@@ -437,7 +437,7 @@ fn foo() -> Option<usize> {
437437 #[ test]
438438 fn test_ref_expr ( ) {
439439 check_assist (
440- inline_local_varialbe ,
440+ inline_local_variable ,
441441 "
442442fn foo() {
443443 let bar = 10;
@@ -455,7 +455,7 @@ fn foo() {
455455 #[ test]
456456 fn test_tuple_expr ( ) {
457457 check_assist (
458- inline_local_varialbe ,
458+ inline_local_variable ,
459459 "
460460fn foo() {
461461 let a<|> = (10, 20);
@@ -471,7 +471,7 @@ fn foo() {
471471 #[ test]
472472 fn test_array_expr ( ) {
473473 check_assist (
474- inline_local_varialbe ,
474+ inline_local_variable ,
475475 "
476476fn foo() {
477477 let a<|> = [1, 2, 3];
@@ -487,7 +487,7 @@ fn foo() {
487487 #[ test]
488488 fn test_paren ( ) {
489489 check_assist (
490- inline_local_varialbe ,
490+ inline_local_variable ,
491491 "
492492fn foo() {
493493 let a<|> = (10 + 20);
@@ -505,7 +505,7 @@ fn foo() {
505505 #[ test]
506506 fn test_path_expr ( ) {
507507 check_assist (
508- inline_local_varialbe ,
508+ inline_local_variable ,
509509 "
510510fn foo() {
511511 let d = 10;
@@ -525,7 +525,7 @@ fn foo() {
525525 #[ test]
526526 fn test_block_expr ( ) {
527527 check_assist (
528- inline_local_varialbe ,
528+ inline_local_variable ,
529529 "
530530fn foo() {
531531 let a<|> = { 10 };
@@ -543,7 +543,7 @@ fn foo() {
543543 #[ test]
544544 fn test_used_in_different_expr1 ( ) {
545545 check_assist (
546- inline_local_varialbe ,
546+ inline_local_variable ,
547547 "
548548fn foo() {
549549 let a<|> = 10 + 20;
@@ -565,7 +565,7 @@ fn foo() {
565565 #[ test]
566566 fn test_used_in_for_expr ( ) {
567567 check_assist (
568- inline_local_varialbe ,
568+ inline_local_variable ,
569569 "
570570fn foo() {
571571 let a<|> = vec![10, 20];
@@ -581,7 +581,7 @@ fn foo() {
581581 #[ test]
582582 fn test_used_in_while_expr ( ) {
583583 check_assist (
584- inline_local_varialbe ,
584+ inline_local_variable ,
585585 "
586586fn foo() {
587587 let a<|> = 1 > 0;
@@ -597,7 +597,7 @@ fn foo() {
597597 #[ test]
598598 fn test_used_in_break_expr ( ) {
599599 check_assist (
600- inline_local_varialbe ,
600+ inline_local_variable ,
601601 "
602602fn foo() {
603603 let a<|> = 1 + 1;
@@ -617,7 +617,7 @@ fn foo() {
617617 #[ test]
618618 fn test_used_in_return_expr ( ) {
619619 check_assist (
620- inline_local_varialbe ,
620+ inline_local_variable ,
621621 "
622622fn foo() {
623623 let a<|> = 1 > 0;
@@ -633,7 +633,7 @@ fn foo() {
633633 #[ test]
634634 fn test_used_in_match_expr ( ) {
635635 check_assist (
636- inline_local_varialbe ,
636+ inline_local_variable ,
637637 "
638638fn foo() {
639639 let a<|> = 1 > 0;
0 commit comments