diff options
author | Blaž Hrastnik | 2021-03-24 05:52:13 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-24 05:58:01 +0000 |
commit | 06aca7691c845d129abc49fb649ea7c42376a077 (patch) | |
tree | d8eaf53aec0d323914d7839a36caa2a748885c3a /helix-core/src/transaction.rs | |
parent | 8a0ab447ecfa6c2c448603d469ba4fd06e95c754 (diff) |
clippy lint
Diffstat (limited to 'helix-core/src/transaction.rs')
-rw-r--r-- | helix-core/src/transaction.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index d707016b..aaf912dd 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -84,11 +84,7 @@ impl ChangeSet { } let new_last = match self.changes.as_mut_slice() { - [.., Insert(prev)] => { - prev.push_tendril(&fragment); - return; - } - [.., Insert(prev), Delete(_)] => { + [.., Insert(prev)] | [.., Insert(prev), Delete(_)] => { prev.push_tendril(&fragment); return; } @@ -115,7 +111,7 @@ impl ChangeSet { /// Combine two changesets together. /// 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: ChangeSet) -> Self { + pub fn compose(self, other: Self) -> Self { debug_assert!(self.len_after() == other.len); let len = self.changes.len(); |