Skip to content

Commit

Permalink
applyFunction should have F as type param
Browse files Browse the repository at this point in the history
  • Loading branch information
simerplaha committed Oct 7, 2019
1 parent 2ed4a78 commit 5c81825
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions swaydb/src/main/scala/swaydb/Map.scala
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ case class Map[K, V, F, T[_]](private[swaydb] val core: Core[T],
function
}

def applyFunction[B <: F with swaydb.Function[K, V]](key: K, function: B): T[IO.Done] =
def applyFunction(key: K, function: F with swaydb.Function[K, V]): T[IO.Done] =
tag.point(core.function(key, function.id))

def applyFunction[B <: F with swaydb.Function[K, V]](from: K, to: K, function: B): T[IO.Done] =
def applyFunction(from: K, to: K, function: F with swaydb.Function[K, V]): T[IO.Done] =
tag.point(core.function(from, to, function.id))

def commit(prepare: Prepare[K, V]*): T[IO.Done] =
Expand Down
8 changes: 4 additions & 4 deletions swaydb/src/main/scala/swaydb/Set.scala
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ case class Set[A, F, T[_]](private val core: Core[T],
function
}

def applyFunction(from: A, to: A, functionId: A): T[IO.Done] =
tag.point(core.function(from, to, functionId))
def applyFunction(from: A, to: A, function: F with swaydb.Function.GetKey[A, Nothing]): T[IO.Done] =
tag.point(core.function(from, to, function.id))

def applyFunction(elem: A, function: A): T[IO.Done] =
tag.point(core.function(elem, function))
def applyFunction(elem: A, function: F with swaydb.Function.GetKey[A, Nothing]): T[IO.Done] =
tag.point(core.function(elem, function.id))

def commit(prepare: Prepare[A, Nothing]*): T[IO.Done] =
tag.point(core.put(prepare))
Expand Down

0 comments on commit 5c81825

Please sign in to comment.