Prepare for introducing copy_from_slice.

This commit is contained in:
Nigel Tao committed 2017-10-13 10:30:22 +11:00
1 parent 36ba4b866c
commit 66f712039b
3 files changed
+37 -16

No files matched your search

+2
View File
@@ -218,6 +218,7 @@ pri func decoder.decode_uncompressed?(dst writer1, src reader1)() {
}
length -= n
if in.dst.available() == 0 {
// TODO: "closed for writes" instead?
return suspension "short write"
} else {
return suspension "short read"
@@ -401,6 +402,7 @@ pri func decoder.decode_huffman?(dst writer1, src reader1)() {
return error "internal error: inconsistent Huffman decoder state"
}
length -= n
// TODO: "closed for writes" instead?
return suspension "short write"
}
}