Skip to content

Commit

Permalink
Merge pull request #8 from Free2MoveApp/make-delete-vararg
Browse files Browse the repository at this point in the history
Allow deletion of several keys via vararg on StringCommands.del()
  • Loading branch information
gvolpe authored Jul 22, 2018
2 parents f046bed + 5b3324f commit a432d42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ trait StringCommands[F[_], K, V]
with Decrement[F, K, V]
with Increment[F, K, V]
with Bits[F, K, V] {
def del(key: K): F[Unit]
def del(key: K*): F[Unit]
def expire(k: K, seconds: FiniteDuration): F[Unit]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ private[fs2redis] class Fs2Redis[F[_], K, V](val client: StatefulRedisConnection

import scala.collection.JavaConverters._

override def del(key: K): F[Unit] =
override def del(key: K*): F[Unit] =
JRFuture {
F.delay(client.async().del(key))
F.delay(client.async().del(key: _*))
}.void

override def expire(key: K, expiresIn: FiniteDuration): F[Unit] =
Expand Down

0 comments on commit a432d42

Please sign in to comment.