On Fri Oct 16, 2026 at 10:53 AM JST, Eliot Courtney wrote:
> +    /// Encodes a 64-bit value as a single-element SEQ64 pair.
> +    pub(crate) fn encode_u64(&mut self, key: KeyId, index: Index, value: 
> u64) -> Result {
> +        // TODO: Consider automatically merging sequential keys.
> +        const KEY_COUNT: u32 = 1;
> +        self.encode_op(
> +            Op::zeroed()
> +                .with_key(key)
> +                .with_index(index)
> +                .with_opcode(Opcode::Seq64)
> +                .with_value(KEY_COUNT),
> +        )?;
> +        self.stream.push_u64(value)

Only noticed now that if `push_u64` fails, the encoded op remains on the
stream without its expected payload. It's not a problem at the moment
because an error here is a global failure, but it would be nice to see
if this cannot be made more atomic by tweaking `EncodedStream` a bit
(same for all the `encode_array` methods below).

Reply via email to