aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/transaction.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-24 05:52:13 +0000
committerBlaž Hrastnik2021-03-24 05:58:01 +0000
commit06aca7691c845d129abc49fb649ea7c42376a077 (patch)
treed8eaf53aec0d323914d7839a36caa2a748885c3a /helix-core/src/transaction.rs
parent8a0ab447ecfa6c2c448603d469ba4fd06e95c754 (diff)
clippy lint
Diffstat (limited to 'helix-core/src/transaction.rs')
-rw-r--r--helix-core/src/transaction.rs8
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();