Skip to content

Commit

Permalink
Fix new scala 2.13 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
durban committed Sep 16, 2023
1 parent 88d12a4 commit a192257
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ object AsyncReactive {
final override def promise[A]: Axn[Promise[F, A]] =
Promise.forAsync[F, A](this, F)

final override def monadCancel =
final override def monadCancel: MonadCancel[F, Throwable] =
F
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
package dev.tauri.choam
package async

import cats.effect.std.{ Queue => CatsQueue }

abstract class OverflowQueue[F[_], A]
extends UnboundedQueue.WithSize[F, A] {

Expand Down Expand Up @@ -62,7 +64,7 @@ object OverflowQueue {
final override def size: F[Int] =
F.run(buff.size)

final override def toCats =
final override def toCats: CatsQueue[F, A] =
new AsyncQueue.CatsQueueAdapter(this)

final override def tryEnqueue: Rxn[A, Boolean] =
Expand All @@ -87,7 +89,7 @@ object OverflowQueue {
final def size: F[Int] =
F.run(q.size)

final def toCats =
final def toCats: CatsQueue[F, A] =
new AsyncQueue.CatsQueueAdapter(this)

final def tryEnqueue: Rxn[A, Boolean] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ object UnboundedQueue {
F.monad.widen(wl.asyncGet)
final override def size: F[Int] =
q.size.run[F]
final override def toCats =
final override def toCats: CatsQueue[F, A] =
new AsyncQueue.CatsQueueAdapter(this)
}
}
Expand Down
8 changes: 4 additions & 4 deletions bench/src/main/scala/dev/tauri/choam/bench/DataMapBench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -439,24 +439,24 @@ object DataMapBench {
@State(Scope.Benchmark)
class ChmSt extends JucCmSt {

import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.{ ConcurrentMap, ConcurrentHashMap }

private[this] val chm: ConcurrentHashMap[String, String] =
new ConcurrentHashMap[String, String]

final override def cm =
final override def cm: ConcurrentMap[String, String] =
chm
}

@State(Scope.Benchmark)
class CslmSt extends JucCmSt {

import java.util.concurrent.ConcurrentSkipListMap
import java.util.concurrent.{ ConcurrentMap, ConcurrentSkipListMap }

val cslm: ConcurrentSkipListMap[String, String] =
new ConcurrentSkipListMap[String, String]

final override def cm =
final override def cm:ConcurrentMap[String, String] =
cslm
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object Reactive {
}
}

final override def monad =
final override def monad: Monad[F] =
F
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private object LogMap {
final override def size =
0

final override def valuesIterator =
final override def valuesIterator: Iterator[HalfWordDescriptor[_]] =
Iterator.empty

final override def nonEmpty =
Expand Down

0 comments on commit a192257

Please sign in to comment.