Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/transaction.rs')
-rw-r--r--helix-core/src/transaction.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index 37be2e2e..450b4736 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -19,16 +19,6 @@ pub enum Operation {
Insert(Tendril),
}
-impl Operation {
- /// The number of characters affected by the operation.
- pub fn len_chars(&self) -> usize {
- match self {
- Self::Retain(n) | Self::Delete(n) => *n,
- Self::Insert(s) => s.chars().count(),
- }
- }
-}
-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum Assoc {
Before,
@@ -361,7 +351,6 @@ impl ChangeSet {
pos += s.chars().count();
}
}
- println!("=>\n{text}");
}
true
}
@@ -521,7 +510,7 @@ impl ChangeSet {
pos
}
- pub fn changes_iter(&self) -> ChangeIterator<'_> {
+ pub fn changes_iter(&self) -> ChangeIterator {
ChangeIterator::new(self)
}
}
@@ -754,7 +743,7 @@ impl Transaction {
})
}
- pub fn changes_iter(&self) -> ChangeIterator<'_> {
+ pub fn changes_iter(&self) -> ChangeIterator {
self.changes.changes_iter()
}
}