Skip to main content

inline_function

Function inline_function 

Source
pub fn inline_function(
    project: &ProjectRoot,
    file_path: &str,
    function_name: &str,
    name_path: Option<&str>,
    dry_run: bool,
) -> Result<InlineResult>
Expand description

Inline a function: replace all call sites with the function body, then remove the definition.

Supports single-expression and multi-statement bodies. For multi-statement bodies, only single call-site inlining is supported (otherwise ambiguous).