Skip to content

Commit

Permalink
Golf: list.concat (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
Masynchin authored Feb 6, 2025
2 parents ad7cc07 + f8a7935 commit 39b6130
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/db/src/main/scala/Db.scala
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private object Sql:
case (None, None) => none

private def filterFragment(filter: PlayerFilter): Option[AppliedFragment] =
List(
List.concat(
filter.name.map(nameLikeFragment),
between("standard", filter.standard),
between("rapid", filter.rapid),
Expand All @@ -224,7 +224,7 @@ private object Sql:
filter.otherTitles.map(xs => playersByOtherTitles(xs.size)(xs)),
filter.gender.map(filterGender),
between("birth_year", filter.birthYearMin, filter.birthYearMax)
).flatten.match
) match
case Nil => none
case xs => xs.intercalate(and).some

Expand Down

0 comments on commit 39b6130

Please sign in to comment.