Avril 4 years ago
parent 7caa310e7e
commit af6446b335
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -172,8 +172,11 @@ impl<T> VecExt<T> for Vec<T>
(_, Some(bound)) | (bound, _) => self.reserve(bound), (_, Some(bound)) | (bound, _) => self.reserve(bound),
}; };
let splice = self.split_off(location); self.splice(location..location, slice);
self.extend(slice.chain(splice.into_iter()));
//let splice = self.split_off(location);
//self.extend(slice.chain(splice.into_iter()));
/* /*
// shift everything across, replacing with the new values // shift everything across, replacing with the new values
let splice: Vec<_> = self.splice(location.., slice).collect(); let splice: Vec<_> = self.splice(location.., slice).collect();

@ -111,7 +111,7 @@ mod tests
title: None, title: None,
karada, karada,
worker: Worker::Suspended(kokoro), worker: kokoro,
timestamp: post::PostTimestamp::new() timestamp: post::PostTimestamp::new()
} }

Loading…
Cancel
Save