redis-rs v0.13.0 Release Notes

Release Date: 2019-10-14 // about 1 month ago
  • 🛠 Fixes and improvements

    • 💥 Breaking change: rename parse_async to parse_redis_value_async for consistency (ce59cecb).
    • ⚙ Run clippy over the entire codebase (#238)
    • 💥 Breaking change: Make Script#invoke_async generic over aio::ConnectionLike (#242)

    💥 BREAKING CHANGES

    📜 Rename parse_async to parse_redis_value_async for consistency (ce59cecb).

    📜 If you used redis::parse_async before, you now need to change this to redis::parse_redis_value_async or import the method under the new name: use redis::parse_redis_value_async.

    👉 Make Script#invoke_async generic over aio::ConnectionLike (#242)

    👍 Script#invoke_async was changed to be generic over aio::ConnectionLike in order to support wrapping a SharedConnection in user code. This required adding a new generic parameter to the method, causing an error when the return type is defined using the turbofish syntax.

    Old:

    redis::Script::new("return ...")
      .key("key1")
      .arg("an argument")
      .invoke_async::<String>()
    

    🆕 New:

    redis::Script::new("return ...")
      .key("key1")
      .arg("an argument")
      .invoke_async::<_, String>()
    

Previous changes from v0.12.0

  • 🛠 Fixes and improvements

    • 💥 Breaking change: Use dyn keyword to avoid deprecation warning (#223)
    • 💥 Breaking change: Update url dependency to v2 (#234)
    • 💥 Breaking change: (async) Fix Script::invoke_async return type error (#233)
    • ➕ Add GETRANGE and SETRANGE commands (#202)
    • 🛠 Fix SINTERSTORE wrapper name, it's now correctly sinterstore (#225)
    • 👍 Allow running SharedConnection with any other runtime (#229)
    • Reformatted as Edition 2018 code (#235)

    💥 BREAKING CHANGES

    🗄 Use dyn keyword to avoid deprecation warning (#223)

    🗄 Rust nightly deprecated bare trait objects. ⚠ This PR adds the dyn keyword to all trait objects in order to get rid of the warning. 👍 This bumps the minimal supported Rust version to Rust 1.27.

    ⚡️ Update url dependency to v2 (#234)

    We updated the url dependency to v2. We do expose this on our public API on the redis::parse_redis_url function. If you depend on that, make sure to also upgrade your direct dependency.

    (async) Fix Script::invoke_async return type error (#233)

    Previously, invoking a script with a complex return type would cause the following error:

    Response was of incompatible type: "Not a bulk response" (response was string data('"4b98bef92b171357ddc437b395c7c1a5145ca2bd"'))
    

    This was because the Future returned when loading the script into the database returns the hash of the script, and thus the return type of String would not match the intended return type.

    This commit adds an enum to account for the different Future return types.