mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Move the "mark in.dst" into the flate decode loop.
This commit is contained in:
1 parent
c70fc8fcc6
commit
36f5ae9bf4
4 files changed
+9
-20
No files matched your search
@@ -116,12 +116,9 @@ pub struct flate_decoder?(
|
||||
)
|
||||
|
||||
pub func flate_decoder.decode?(dst writer1, src reader1)() {
|
||||
// TODO: when is the mark undone? Explicitly or implicitly? Right now, we
|
||||
// just assume that the mark is dropped at function end, since the arg is a
|
||||
// writer1 not a *writer1. Should we support nested marks? Should this be
|
||||
// "mark dst { etc }" that has a block and unmarks at the block end?
|
||||
mark in.dst
|
||||
while true {
|
||||
// TODO: this could be "in.dst.mark()" instead of a keyword.
|
||||
mark in.dst
|
||||
var z status = try this.decode_blocks?(dst:in.dst, src:in.src)
|
||||
if not z.is_suspension() {
|
||||
// TODO: rename "return" to "raise"?
|
||||
|
||||
Reference in new issue
Block a user