fix: Correctly detect empty transactions

Fixes #1221
This commit is contained in:
Blaž Hrastnik 2021-12-02 23:49:54 +09:00
parent 27ffc79c44
commit 119dee2980

View File

@ -330,7 +330,7 @@ impl ChangeSet {
/// `true` when the set is empty.
#[inline]
pub fn is_empty(&self) -> bool {
self.changes.is_empty()
self.changes.is_empty() || self.changes == [Operation::Retain(self.len)]
}
/// Map a position through the changes.