Skip to content

Commit bde33d8

Browse files
committed
Proper panic message
1 parent 1ae7d16 commit bde33d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/write/encoder.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ impl<W: Write> EncoderWriter<W> {
230230
/// trait. Note that the inner writer might be in an error state or have an incomplete
231231
/// base64 string written to it.
232232
pub fn into_inner(mut self) -> W {
233-
self.delegate.take().unwrap()
233+
self.delegate
234+
.take()
235+
.expect("Encoder has already had finish() called")
234236
}
235237
}
236238

0 commit comments

Comments
 (0)