We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ca41bdd + 3347248 commit 057957cCopy full SHA for 057957c
src/map.rs
@@ -197,9 +197,8 @@ impl Map<String, Value> {
197
#[inline]
198
pub fn append(&mut self, other: &mut Self) {
199
#[cfg(feature = "preserve_order")]
200
- for (k, v) in mem::replace(&mut other.map, MapImpl::default()) {
201
- self.map.insert(k, v);
202
- }
+ self.map
+ .extend(mem::replace(&mut other.map, MapImpl::default()));
203
#[cfg(not(feature = "preserve_order"))]
204
self.map.append(&mut other.map);
205
}
@@ -304,6 +303,11 @@ impl Clone for Map<String, Value> {
304
303
map: self.map.clone(),
305
306
+
307
+ #[inline]
308
+ fn clone_from(&mut self, source: &Self) {
309
+ self.map.clone_from(&source.map)
310
+ }
311
312
313
impl PartialEq for Map<String, Value> {
0 commit comments