Skip to content

Commit

Permalink
Slice.classTag
Browse files Browse the repository at this point in the history
  • Loading branch information
simerplaha committed Nov 30, 2021
1 parent c7917a8 commit 617c817
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slice/src/main/scala/swaydb/slice/Slice.scala
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ final class SliceMut[@specialized(Byte) +T](protected[this] override val array:
*/
sealed trait SliceRO[+A] extends Iterable[A] {

implicit def classTag: ClassTag[A]@uncheckedVariance

/**
* Get element at index after doing bound checks.
*/
Expand Down Expand Up @@ -303,8 +305,6 @@ sealed trait Slice[@specialized(Byte) +T] extends SliceRO[T] with SliceOption[T]
*/
def written: Int

implicit def classTag: ClassTag[T]@uncheckedVariance

protected[this] def array: Array[T]

protected[this] def createEmpty: This
Expand Down Expand Up @@ -1165,7 +1165,7 @@ object Slices {
* - [[slices]] cannot be empty.
*
*/
class Slices[A: ClassTag](val slices: Array[Slice[A]]) extends SliceRO[A] {
class Slices[A](val slices: Array[Slice[A]])(override implicit val classTag: ClassTag[A]@uncheckedVariance) extends SliceRO[A] {

val blockSize: Int =
slices.head.size
Expand Down

0 comments on commit 617c817

Please sign in to comment.