Skip to content

Commit

Permalink
Allow deletion of several keys via vararg on StringCommands.del()
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick Heiber committed Jul 12, 2018
1 parent f046bed commit 5b3324f
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 5b3324f

Please sign in to comment.