Skip to content
This repository was archived by the owner on Jun 8, 2025. It is now read-only.

Commit 46c2c25

Browse files
committed
clippy fix
1 parent 730f459 commit 46c2c25

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/diff.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ macro_rules! direct_compare {
4343
lhs: Some(lhs),
4444
rhs: Some(&self.rhs),
4545
path: self.path.clone(),
46-
config: self.config.clone(),
46+
config: self.config,
4747
});
4848
}
4949
}
@@ -71,7 +71,7 @@ impl<'a, 'b> DiffFolder<'a, 'b> {
7171
lhs: Some(lhs),
7272
rhs: Some(self.rhs),
7373
path: self.path.clone(),
74-
config: self.config.clone(),
74+
config: self.config,
7575
});
7676
}
7777
}
@@ -86,13 +86,13 @@ impl<'a, 'b> DiffFolder<'a, 'b> {
8686
let path = self.path.append(Key::Idx(idx));
8787

8888
if let Some(lhs) = lhs.get(idx) {
89-
diff_with(lhs, rhs, self.config.clone(), path, self.acc)
89+
diff_with(lhs, rhs, self.config, path, self.acc)
9090
} else {
9191
self.acc.push(Difference {
9292
lhs: None,
9393
rhs: Some(self.rhs),
9494
path,
95-
config: self.config.clone(),
95+
config: self.config,
9696
});
9797
}
9898
}
@@ -108,22 +108,22 @@ impl<'a, 'b> DiffFolder<'a, 'b> {
108108

109109
match (lhs.get(key), rhs.get(key)) {
110110
(Some(lhs), Some(rhs)) => {
111-
diff_with(lhs, rhs, self.config.clone(), path, self.acc);
111+
diff_with(lhs, rhs, self.config, path, self.acc);
112112
}
113113
(None, Some(rhs)) => {
114114
self.acc.push(Difference {
115115
lhs: None,
116116
rhs: Some(rhs),
117117
path,
118-
config: self.config.clone(),
118+
config: self.config,
119119
});
120120
}
121121
(Some(lhs), None) => {
122122
self.acc.push(Difference {
123123
lhs: Some(lhs),
124124
rhs: None,
125125
path,
126-
config: self.config.clone(),
126+
config: self.config,
127127
});
128128
}
129129
(None, None) => {
@@ -138,7 +138,7 @@ impl<'a, 'b> DiffFolder<'a, 'b> {
138138
lhs: Some(lhs),
139139
rhs: Some(self.rhs),
140140
path: self.path.clone(),
141-
config: self.config.clone(),
141+
config: self.config,
142142
});
143143
}
144144
}
@@ -153,13 +153,13 @@ impl<'a, 'b> DiffFolder<'a, 'b> {
153153
let path = self.path.append(Key::Field(key));
154154

155155
if let Some(lhs) = lhs.get(key) {
156-
diff_with(lhs, rhs, self.config.clone(), path, self.acc)
156+
diff_with(lhs, rhs, self.config, path, self.acc)
157157
} else {
158158
self.acc.push(Difference {
159159
lhs: None,
160160
rhs: Some(self.rhs),
161161
path,
162-
config: self.config.clone(),
162+
config: self.config,
163163
});
164164
}
165165
}
@@ -171,22 +171,22 @@ impl<'a, 'b> DiffFolder<'a, 'b> {
171171

172172
match (lhs.get(key), rhs.get(key)) {
173173
(Some(lhs), Some(rhs)) => {
174-
diff_with(lhs, rhs, self.config.clone(), path, self.acc);
174+
diff_with(lhs, rhs, self.config, path, self.acc);
175175
}
176176
(None, Some(rhs)) => {
177177
self.acc.push(Difference {
178178
lhs: None,
179179
rhs: Some(rhs),
180180
path,
181-
config: self.config.clone(),
181+
config: self.config,
182182
});
183183
}
184184
(Some(lhs), None) => {
185185
self.acc.push(Difference {
186186
lhs: Some(lhs),
187187
rhs: None,
188188
path,
189-
config: self.config.clone(),
189+
config: self.config,
190190
});
191191
}
192192
(None, None) => {
@@ -201,7 +201,7 @@ impl<'a, 'b> DiffFolder<'a, 'b> {
201201
lhs: Some(lhs),
202202
rhs: Some(self.rhs),
203203
path: self.path.clone(),
204-
config: self.config.clone(),
204+
config: self.config,
205205
});
206206
}
207207
}

0 commit comments

Comments
 (0)