lib/encoding/base64: clear() via array-decay now that #258 lands; drop stale comment
This commit is contained in:
@@ -246,16 +246,10 @@ fn encode_closer(s: io.stream) (void | io.error) = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// clear — zero the work buffers after a flush.
|
// clear — zero the work buffers after a flush.
|
||||||
// ref/hare/encoding/base64/base64.ha:244-247. Hare passes the bare
|
// ref/hare/encoding/base64/base64.ha:244-247.
|
||||||
// arrays (`bytes::zero(e.ibuf)`) which array-decay to a WHOLE-array
|
|
||||||
// slice — a hygiene wipe of every byte. ww has no implicit [N]T->[]T
|
|
||||||
// coercion yet (#258), so the slices are spelled EXPLICIT and
|
|
||||||
// FULL-LENGTH (`[0:len(...)]`, length via len() per rule-13) to
|
|
||||||
// preserve Hare's whole-array wipe; a windowed slice would leave stale
|
|
||||||
// tail bytes (a behavioral divergence).
|
|
||||||
fn clear(e: *encoder) void = {
|
fn clear(e: *encoder) void = {
|
||||||
bytes.zero(e.ibuf[0 : len(e.ibuf)]);
|
bytes.zero(e.ibuf);
|
||||||
bytes.zero(e.obuf[0 : len(e.obuf)]);
|
bytes.zero(e.obuf);
|
||||||
};
|
};
|
||||||
|
|
||||||
// encodeslice — encode `in` and return a fresh byte slice of base64
|
// encodeslice — encode `in` and return a fresh byte slice of base64
|
||||||
|
|||||||
Reference in New Issue
Block a user