github dahomey-technologies/rustis 0.26.0

4 hours ago

BREAKING CHANGES

  • A batch of one reply read as a sequence is now the batch, not the reply.
    Vec<T> and tuples over a pipeline or a transaction retaining exactly one
    command used to read that command's own reply; they now read a one-element
    batch, as they already did above one retained command. A caller who queued a
    single collection-returning command -- pipeline.lrange(..).queue() read as
    Vec<String>, or a BLPOP read as (String, String) -- now asks for
    Vec<Vec<String>> and ((String, String),), or keeps the old reading by
    naming the reply's own type. Every non-sequence form is unchanged.

Fixed

  • A pipeline or a transaction retaining exactly one reply reads as a collection.
    Pipeline::execute::<Vec<T>>() failed with CannotParseSequence when the
    forget flags left a single reply, while the same code with two surviving
    replies succeeded -- so a caller looping over a variable number of commands had
    to special-case the count. A batch of one carries two readings, the sequence of
    one and the reply itself, and the batch deserializer resolved them by picking
    the reply unconditionally. It now resolves them the way serde already tells them
    apart: the sequence forms answer for the batch, every other form is answered by
    the lone reply. Transaction::execute carried the same shortcut and now goes
    through the very same deserializer, so the two agree on every type. The same
    defect also made (String,) unreadable on a one-command pipeline, which is
    what examples/pipelining.rs shows; it now works.

Internal

  • EXEC's reply is read by the pipeline's batch deserializer. The transaction
    had its own DeserializeSeed and SeqAccess deserializer duplicating what
    RespBatchDeserializer does; EXEC's elements are now handed out as responses
    of their own -- a refcount bump each, no byte copied -- and read as a batch.
    A forgotten reply is dropped unread there as it already was in a pipeline,
    errors included.

  • into_collection_iter states its bounds without an #[expect]. The head
    increment is a saturating_add, so no arithmetic_side_effects warning is
    raised for the expectation to catch and the reasoning stays where the index is
    computed.

  • tape_memory reads its nodes with as_chunks. chunks_exact with a
    constant size is what clippy::chunks_exact_to_as_chunks names; the array
    chunks it yields also drop the try_into().unwrap() each word went through.

Don't miss a new rustis release

NewReleases is sending notifications on new releases.