Skip to content

Commit fe23ea3

Browse files
committed
fix warnings
1 parent 6739b28 commit fe23ea3

9 files changed

Lines changed: 11 additions & 14 deletions

File tree

build.sbt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ def publishScalaOptions(scalaVersion: String): Seq[String] = {
4545
CrossVersion.partialVersion(scalaVersion) match {
4646
case Some((2, major)) if major >= 13 =>
4747
Seq(
48-
// "-opt:l:inline",
49-
// "-opt-warnings",
50-
// "-opt-inline-from:swaydb.**",
51-
// "-Yopt-log-inline",
52-
// "_"
48+
"-opt:l:inline",
49+
"-opt-warnings",
50+
"-opt-inline-from:swaydb.**",
51+
"-Yopt-log-inline",
52+
"_"
5353
)
5454

5555
case Some((2, 12)) =>

core/src/test/scala/swaydb/core/segment/SegmentRefGetBehaviorSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class SegmentRefGetBehaviorSpec extends TestBase with MockFactory {
147147
SegmentRef.get(key = keyValue1.key, threadState = threadState) shouldBe keyValue1
148148

149149
val segmentState = threadState.getSegmentState(path).getS
150-
segmentState.keyValue shouldBe keyValue1
150+
segmentState.keyValue._2 shouldBe keyValue1
151151
keyValue1.key.underlyingArraySize shouldBe 4
152152
segmentState.isSequential shouldBe true
153153
}

data/src/main/scala-2.13/swaydb/data/slice/Slice.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ object Slice extends SliceCompanionBase {
8282
def clear() =
8383
slice = Slice.create[A](slice.size)
8484

85-
def result: Slice[A] =
85+
def result(): Slice[A] =
8686
slice.close()
8787
}
8888

data/src/main/scala/swaydb/Bag.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ object Bag extends LazyLogging {
555555
}(ec, QueueOrder.FIFO)
556556

557557
override def execute[F](f: => F): Future[F] = {
558-
val promise = Promise[F]
558+
val promise = Promise[F]()
559559
actor.send(() => promise.tryComplete(Try(f)))
560560
promise.future
561561
}

data/src/main/scala/swaydb/Error.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ import java.nio.file.{NoSuchFileException, Path}
3131

3232
import swaydb.IO.RecoverableExceptionHandler
3333
import swaydb.data.Reserve
34-
import swaydb.data.slice.Slice
35-
3634

3735
protected sealed trait Error {
3836
def exception: Throwable

data/src/main/scala/swaydb/Exception.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import java.nio.channels.OverlappingFileLockException
2828
import java.nio.file.Path
2929

3030
import swaydb.data.Reserve
31-
import swaydb.data.slice.Slice
3231

3332
/**
3433
* Exception types for all known [[Error]]s that can occur. Each [[Error]] can be converted to

data/src/main/scala/swaydb/data/Reserve.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ object Reserve {
6161
def promise[T](reserve: Reserve[T]): Promise[Unit] =
6262
reserve.synchronized {
6363
if (reserve.isBusy) {
64-
val promise = Promise[Unit]
64+
val promise = Promise[Unit]()
6565
reserve.savePromise(promise)
6666
promise
6767
} else {

swaydb-cats-effect/src/main/scala/swaydb/cats/effect/Bag.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object Bag {
5252
}(ec, QueueOrder.FIFO)
5353

5454
override def execute[F](f: => F): IO[F] = {
55-
val promise = Promise[F]
55+
val promise = Promise[F]()
5656
actor.send(() => promise.tryComplete(Try(f)))
5757
IO.fromFuture(IO(promise.future))
5858
}

swaydb/src/main/scala/swaydb/MultiMap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ object MultiMap {
6464
)
6565
)
6666

67-
//Root Map has empty keys so if this database is new commit initial entries.
67+
//RootMap has empty keys so if this database is new commit initial entries.
6868
if (isEmpty)
6969
bag.transform(initialEntries) {
7070
_ =>

0 commit comments

Comments
 (0)