• Nathan Harris's avatar
    59 -- Use `RESPValueConvertible` as Generic Constraint · fa227b0e
    Nathan Harris authored
    Johannes continues to provide great insight, and correctly pointed out that `RESPValueConvertible` was being used as an "existential" in all cases.
    This can cause unexpected type-erasure and introduce unnecessary cost overhead with dynamic dispatch when in most cases we know the exact value we want for `RESPValue` to execute commands.
    - Add new extensions to `Array where Element == RESPValue` for appending and adding elements into them
    - Change `RedisClient.send(command:with:)` to require `[RESPValue]` instead of `[RESPValueConvertible]` as the `with` argument type
    - Change all instances of `RESPValueConvertible` being an "existential" type for method arguments to instead be a generic constraint
    The library should be safeguarded from a class of bugs, with the use of `send` being a bit more straight forward, with some new convenience methods for `[RESPValue]` types.
Last commit
Last update
RedisNIO Loading commit data...
RedisNIOTestUtils/Extensions Loading commit data...