mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 06:18:31 +00:00
@@ -228,7 +228,7 @@ impl ZeroizeString {
|
||||
|
||||
/// Remove any number of newline or carriage returns from the end of a vector of bytes.
|
||||
pub fn without_newlines(&self) -> ZeroizeString {
|
||||
let stripped_string = self.0.trim_end_matches(|c| c == '\r' || c == '\n').into();
|
||||
let stripped_string = self.0.trim_end_matches(['\r', '\n']).into();
|
||||
Self(stripped_string)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,10 +100,7 @@ impl<'a> AlignedRecordDecorator<'a> {
|
||||
self.ignore_comma = false;
|
||||
Ok(buf.len())
|
||||
} else if self.message_active {
|
||||
self.wrapped.write(buf).map(|n| {
|
||||
self.message_count += n;
|
||||
n
|
||||
})
|
||||
self.wrapped.write(buf).inspect(|n| self.message_count += n)
|
||||
} else {
|
||||
self.wrapped.write(buf)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user