From fa4caf7e3d43a40073f6966d37f529d5197bd840 Mon Sep 17 00:00:00 2001 From: Brian Shu Date: Thu, 26 Aug 2021 14:45:23 -0400 Subject: remove unsafe --- helix-core/src/transaction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-core') diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index d15db000..d682f058 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -125,7 +125,7 @@ impl ChangeSet { /// In other words, If `this` goes `docA` → `docB` and `other` represents `docB` → `docC`, the /// returned value will represent the change `docA` → `docC`. pub fn compose(self, other: Self) -> Self { - debug_assert!(self.len_after == other.len); + assert!(self.len_after == other.len); // composing fails in weird ways if one of the sets is empty // a: [] len: 0 len_after: 1 | b: [Insert(Tendril(inline: "\n")), Retain(1)] len 1 -- cgit v1.2.3-70-g09d2