Skip to main content

changeset_from_hunks

Function changeset_from_hunks 

Source
pub fn changeset_from_hunks(hunks: &[&Hunk], len_before: usize) -> ChangeSet
Expand description

The single change that applies hunks to a document of len_before chars.

Hunks must be non-overlapping and are applied in document order, so accepting several at once is one transaction — and therefore one undo step (ADR-0006 §6).