aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/transaction.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-03 01:02:44 +0000
committerBlaž Hrastnik2021-12-03 01:02:44 +0000
commit01f7a312d0bdf53184fb579bf41c619230449cce (patch)
tree75c1faf43102b1a448edc9525e843cccaa02ff88 /helix-core/src/transaction.rs
parenta45df126999e4c081c0f2b26e20f2a7fedcd7b87 (diff)
Address new lint on 1.57
Diffstat (limited to 'helix-core/src/transaction.rs')
-rw-r--r--helix-core/src/transaction.rs12
1 files changed, 1 insertions, 11 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index 9c07be2c..b62f4a9b 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -22,7 +22,7 @@ pub enum Assoc {
}
// ChangeSpec = Change | ChangeSet | Vec<Change>
-#[derive(Debug, Clone, PartialEq, Eq)]
+#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct ChangeSet {
pub(crate) changes: Vec<Operation>,
/// The required document length. Will refuse to apply changes unless it matches.
@@ -30,16 +30,6 @@ pub struct ChangeSet {
len_after: usize,
}
-impl Default for ChangeSet {
- fn default() -> Self {
- Self {
- changes: Vec::new(),
- len: 0,
- len_after: 0,
- }
- }
-}
-
impl ChangeSet {
pub fn with_capacity(capacity: usize) -> Self {
Self {