dqminh / bb8-memcached

MIT License
4 stars 10 forks source link

Bump bb8 from 0.4 to 0.5 #1

Closed maximebedard closed 3 years ago

maximebedard commented 3 years ago

I've bumped bb8 to 0.5 and tweaked a few things:

I could see someone that would like to use the MemcachePool::run method, but it can easily be achieved by using TryFutureExt::and_then. E.g.

use futures::future::TryFutureExt;

pool
  .get()
  .and_then(|mut conn| async move {
    conn.get("foo")
      .await
      .map(SoBytes)
      .map_err(bb8::RunError::User)
  })
  .await

Let me know what you think! Thanks!

dqminh commented 3 years ago

@maximebedard i'm very sorry for the delay. This looks great ! Thanks so much for your help.