fix drain
This commit is contained in:
parent
cd2f58c920
commit
e9598831cc
1 changed files with 1 additions and 2 deletions
|
@ -97,8 +97,7 @@ impl MutableValue<'_, '_, '_> {
|
||||||
/// the Value event(s) are replaced with a single new event containing the
|
/// the Value event(s) are replaced with a single new event containing the
|
||||||
/// new value.
|
/// new value.
|
||||||
pub fn set_bytes(&mut self, input: Vec<u8>) {
|
pub fn set_bytes(&mut self, input: Vec<u8>) {
|
||||||
self.section.drain(self.index..self.size);
|
self.section.drain(self.index..self.index + self.size);
|
||||||
|
|
||||||
self.size = 1;
|
self.size = 1;
|
||||||
self.section
|
self.section
|
||||||
.insert(self.index, Event::Value(Cow::Owned(input)));
|
.insert(self.index, Event::Value(Cow::Owned(input)));
|
||||||
|
|
Reference in a new issue