Add identity expansion checking

This commit is contained in:
Edwin Cheng 2020-03-21 22:43:48 +08:00
parent 92b561b5c7
commit e1a9461806
3 changed files with 55 additions and 3 deletions

View file

@ -95,6 +95,10 @@ impl TreeDiff {
builder.replace(from.text_range(), to.to_string())
}
}
pub fn is_empty(&self) -> bool {
self.replacements.is_empty()
}
}
/// Finds minimal the diff, which, applied to `from`, will result in `to`.