on master help sign in
Address new lint on 1.57
01f7a31Blaž Hrastnik
helix-core/src/transaction.rs+1−11
@@ -22,7 +22,7 @@ pub enum Assoc {
22}
22}
23
23
24// ChangeSpec = Change | ChangeSet | Vec<Change>
24// ChangeSpec = Change | ChangeSet | Vec<Change>
25−#[derive(Debug, Clone, PartialEq, Eq)]
25+#[derive(Debug, Default, Clone, PartialEq, Eq)]
26pub struct ChangeSet {
26pub struct ChangeSet {
27 pub(crate) changes: Vec<Operation>,
27 pub(crate) changes: Vec<Operation>,
28 /// The required document length. Will refuse to apply changes unless it matches.
28 /// The required document length. Will refuse to apply changes unless it matches.
@@ -30,16 +30,6 @@ pub struct ChangeSet {
30 len_after: usize,
30 len_after: usize,
31}
31}
32
32
33−impl Default for ChangeSet {
34− fn default() -> Self {
35− Self {
36− changes: Vec::new(),
37− len: 0,
38− len_after: 0,
39− }
40− }
41−}
42−
43impl ChangeSet {
33impl ChangeSet {
44 pub fn with_capacity(capacity: usize) -> Self {
34 pub fn with_capacity(capacity: usize) -> Self {
45 Self {
35 Self {