Make compatible with older veersions of rust
reworked to use std::mem::replace instead of std::mem::take which was
introduced in v1.40.0 which is just a wrapper for replace.
@@ -136,7 +136,7 @@ impl Map<String, Value> {
#[inline]
pub fn append(&mut self, other: &mut Self) {
#[cfg(feature = "preserve_order")]
- for (k, v) in std::mem::take(&mut other.map).into_iter() {
+ for (k, v) in std::mem::replace(&mut other.map, MapImpl::default()).into_iter() {
self.map.insert(k, v);
}
#[cfg(not(feature = "preserve_order"))]
