@@ -1426,10 +1426,10 @@ fn make_call(ctx: &AssistContext<'_>, fun: &Function, indent: IndentLevel) -> Sy
1426
1426
let name = fun. name . clone ( ) ;
1427
1427
let mut call_expr = if fun. self_param . is_some ( ) {
1428
1428
let self_arg = make:: expr_path ( make:: ext:: ident_path ( "self" ) ) ;
1429
- make:: expr_method_call ( self_arg, name, args)
1429
+ make:: expr_method_call ( self_arg, name, args) . into ( )
1430
1430
} else {
1431
1431
let func = make:: expr_path ( make:: path_unqualified ( make:: path_segment ( name) ) ) ;
1432
- make:: expr_call ( func, args)
1432
+ make:: expr_call ( func, args) . into ( )
1433
1433
} ;
1434
1434
1435
1435
let handler = FlowHandler :: from_ret_ty ( fun, & ret_ty) ;
@@ -1911,14 +1911,15 @@ fn make_body(ctx: &AssistContext<'_>, old_indent: IndentLevel, fun: &Function) -
1911
1911
} ;
1912
1912
let func = make:: expr_path ( make:: ext:: ident_path ( constructor) ) ;
1913
1913
let args = make:: arg_list ( iter:: once ( tail_expr) ) ;
1914
- make:: expr_call ( func, args)
1914
+ make:: expr_call ( func, args) . into ( )
1915
1915
} )
1916
1916
}
1917
1917
FlowHandler :: If { .. } => {
1918
1918
let controlflow_continue = make:: expr_call (
1919
1919
make:: expr_path ( make:: path_from_text ( "ControlFlow::Continue" ) ) ,
1920
1920
make:: arg_list ( [ make:: ext:: expr_unit ( ) ] ) ,
1921
- ) ;
1921
+ )
1922
+ . into ( ) ;
1922
1923
with_tail_expr ( block, controlflow_continue)
1923
1924
}
1924
1925
FlowHandler :: IfOption { .. } => {
@@ -1928,12 +1929,12 @@ fn make_body(ctx: &AssistContext<'_>, old_indent: IndentLevel, fun: &Function) -
1928
1929
FlowHandler :: MatchOption { .. } => map_tail_expr ( block, |tail_expr| {
1929
1930
let some = make:: expr_path ( make:: ext:: ident_path ( "Some" ) ) ;
1930
1931
let args = make:: arg_list ( iter:: once ( tail_expr) ) ;
1931
- make:: expr_call ( some, args)
1932
+ make:: expr_call ( some, args) . into ( )
1932
1933
} ) ,
1933
1934
FlowHandler :: MatchResult { .. } => map_tail_expr ( block, |tail_expr| {
1934
1935
let ok = make:: expr_path ( make:: ext:: ident_path ( "Ok" ) ) ;
1935
1936
let args = make:: arg_list ( iter:: once ( tail_expr) ) ;
1936
- make:: expr_call ( ok, args)
1937
+ make:: expr_call ( ok, args) . into ( )
1937
1938
} ) ,
1938
1939
}
1939
1940
}
@@ -2121,17 +2122,18 @@ fn make_rewritten_flow(handler: &FlowHandler, arg_expr: Option<ast::Expr>) -> Op
2121
2122
FlowHandler :: If { .. } => make:: expr_call (
2122
2123
make:: expr_path ( make:: path_from_text ( "ControlFlow::Break" ) ) ,
2123
2124
make:: arg_list ( [ make:: ext:: expr_unit ( ) ] ) ,
2124
- ) ,
2125
+ )
2126
+ . into ( ) ,
2125
2127
FlowHandler :: IfOption { .. } => {
2126
2128
let expr = arg_expr. unwrap_or_else ( make:: ext:: expr_unit) ;
2127
2129
let args = make:: arg_list ( [ expr] ) ;
2128
- make:: expr_call ( make:: expr_path ( make:: ext:: ident_path ( "Some" ) ) , args)
2130
+ make:: expr_call ( make:: expr_path ( make:: ext:: ident_path ( "Some" ) ) , args) . into ( )
2129
2131
}
2130
2132
FlowHandler :: MatchOption { .. } => make:: expr_path ( make:: ext:: ident_path ( "None" ) ) ,
2131
2133
FlowHandler :: MatchResult { .. } => {
2132
2134
let expr = arg_expr. unwrap_or_else ( make:: ext:: expr_unit) ;
2133
2135
let args = make:: arg_list ( [ expr] ) ;
2134
- make:: expr_call ( make:: expr_path ( make:: ext:: ident_path ( "Err" ) ) , args)
2136
+ make:: expr_call ( make:: expr_path ( make:: ext:: ident_path ( "Err" ) ) , args) . into ( )
2135
2137
}
2136
2138
} ;
2137
2139
Some ( make:: expr_return ( Some ( value) ) . clone_for_update ( ) )
0 commit comments