Skip to main content

apply_writebacks

Function apply_writebacks 

Source
pub fn apply_writebacks(
    content: &str,
    pending: &mut [PendingId],
) -> Option<String>
Expand description

Apply pending ID write-backs to a file’s content.

Insertions are applied from bottom to top (highest line number first) so that earlier insertions don’t shift line numbers for later ones.

Returns the modified content, or None if no changes were needed.