From 01f7a312d0bdf53184fb579bf41c619230449cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Fri, 3 Dec 2021 10:02:44 +0900 Subject: [PATCH] Address new lint on 1.57 --- helix-core/src/transaction.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs index 9c07be2c8..b62f4a9bd 100644 --- a/helix-core/src/transaction.rs +++ b/helix-core/src/transaction.rs @@ -22,7 +22,7 @@ pub enum Assoc { } // ChangeSpec = Change | ChangeSet | Vec -#[derive(Debug, Clone, PartialEq, Eq)] +#[derive(Debug, Default, Clone, PartialEq, Eq)] pub struct ChangeSet { pub(crate) changes: Vec, /// 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 {