Skip to main content

apply_single_span

Function apply_single_span 

Source
pub fn apply_single_span(
    root: &Utf8Path,
    edit: &SpanReplacement,
) -> Result<AppliedPatch>
Expand description

Apply one span replacement inside root.

Refuses an edit.file that is absolute or contains .., a zero or inverted line range, or a range past the end of the file. On success the file on disk is rewritten and the replaced text is returned.