Skip to content

Commit

Permalink
accept more evalPut
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Dec 26, 2023
1 parent 25757a6 commit 28c86f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/scala/evalCache/EvalCacheApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ final class EvalCacheApi(mongo: Mongo)(using
def put(sri: Sri, user: User.Id, e: EvalPut): Unit =
truster
.get(user) foreach:
_.filter(_.isEnough) foreach { trust =>
_.filter(_.isEnough) foreach: trust =>
makeInput(
e.variant,
e.fen,
Expand All @@ -65,7 +65,6 @@ final class EvalCacheApi(mongo: Mongo)(using
trust = trust
)
) foreach { putTrusted(sri, user, _) }
}

private def monitorRequest[A](fen: Fen.Epd, mon: Monitor.evalCache.Style)(res: Option[A]): Option[A] =
Fen
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/evalCache/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object Moves extends TotalWrapper[Moves, NonEmptyList[Uci]]:

opaque type Trust = Double
object Trust extends OpaqueDouble[Trust]:
extension (a: Trust) def isEnough = a > 0
extension (a: Trust) def isEnough = a > -1

opaque type SmallFen = String
object SmallFen extends OpaqueString[SmallFen]:
Expand Down

0 comments on commit 28c86f5

Please sign in to comment.