size tweaks

pull/7130/head
Thibault Duplessis 2020-08-18 00:17:13 +02:00
parent f89b162533
commit 2b31c5dc99
2 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ case class Game(
val pairs = clocks.iterator zip clocks.iterator.drop(1)
// We need to determine if this color's last clock had inc applied.
// if finished and history.sizeIs == playedTurns then game was ended
// if finished and history.size == playedTurns then game was ended
// by a players move, such as with mate or autodraw. In this case,
// the last move of the game, and the only one without inc, is the
// last entry of the clock history for !turnColor.
@ -244,7 +244,7 @@ case class Game(
else
copy(
status = Status.Started,
mode = Mode(mode.rated && userIds.distinct.sizeIs == 2)
mode = Mode(mode.rated && userIds.distinct.size == 2)
)
def startClock =

View File

@ -183,7 +183,7 @@ final class ReportApi(
userRepo.byId(userId) zip
getLichessReporter zip
findRecent(1, selectRecent(SuspectId(userId), Reason.Playbans)) flatMap {
case Some(abuser) ~ reporter ~ past if past.sizeIs < 1 =>
case Some(abuser) ~ reporter ~ past if past.isEmpty =>
create(
Candidate(
reporter = reporter,