Skip to main content

closure_to_arrow_function_actions

Function closure_to_arrow_function_actions 

Source
pub fn closure_to_arrow_function_actions(
    source: &str,
    doc: &ParsedDoc,
    range: Range,
    uri: &Uri,
) -> Vec<CodeActionOrCommand>
Expand description

Offer “Convert to arrow function” when the cursor is inside a closure whose body is a single return statement and no use-by-ref captures are present. The innermost convertible closure at the cursor position wins.