File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -94,13 +94,17 @@ impl Drop for Decompressor {
9494 return ;
9595 }
9696
97- // We really should not get here; users are required to call
98- // `finish()` to clean up the stream. But we'll give
97+ // Ideally we should not get here; users should call
98+ // `finish()` to clean up the stream. But in reality there's
99+ // codepaths that can and will short-circuit error out while
100+ // processing the stream, and the Decompressor will get
101+ // dropped before it's finished in those cases. We'll give
99102 // best-effort to clean things up nonetheless. If things go
100103 // wrong, then panic, because we're in a bad state and it's
101104 // likely that we end up with a broken pipe error or a
102105 // deadlock.
103- self . _finish ( ) . expect ( "Decompressor::finish MUST be called" )
106+ self . _finish ( )
107+ . expect ( "Failed to flush pipe while dropping Decompressor" )
104108 }
105109}
106110
You can’t perform that action at this time.
0 commit comments