From 5a575c27e9a694f429347c741bd4eccd3c164737 Mon Sep 17 00:00:00 2001 From: Nando Lawson Date: Sat, 5 Oct 2024 10:29:06 +0200 Subject: [PATCH] File format via rustfmt --- src/write/encoder.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/write/encoder.rs b/src/write/encoder.rs index 6534400..3df8c56 100644 --- a/src/write/encoder.rs +++ b/src/write/encoder.rs @@ -126,7 +126,10 @@ impl<'e, E: Engine, W: io::Write> EncoderWriter<'e, E, W> { pub fn finish(&mut self) -> Result { // If we could consume self in finish(), we wouldn't have to worry about this case, but // finish() is retryable in the face of I/O errors, so we can't consume here. - assert!(self.delegate.is_some(), "Encoder has already had finish() called"); + assert!( + self.delegate.is_some(), + "Encoder has already had finish() called" + ); self.write_final_leftovers()?; @@ -261,7 +264,10 @@ impl<'e, E: Engine, W: io::Write> io::Write for EncoderWriter<'e, E, W> { /// /// Any errors emitted by the delegate writer are returned. fn write(&mut self, input: &[u8]) -> Result { - assert!(self.delegate.is_some(), "Cannot write more after calling finish()"); + assert!( + self.delegate.is_some(), + "Cannot write more after calling finish()" + ); if input.is_empty() { return Ok(0);