Skip to content

Commit

Permalink
scalafmt braces
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanlas committed Aug 7, 2024
1 parent 6362ae0 commit 1991005
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@ docstrings.wrap = yes
includeNoParensInSelectChains = true
optIn.breakChainOnFirstMethodDot = true

rewrite.rules = [RedundantBraces]
rewrite.redundantBraces.ifElseExpressions = true
rewrite.redundantBraces.stringInterpolation = true

rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.removeOptionalBraces = true
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ val commonSettings = Seq(
organization := "com.htmlism",
scalaVersion := "2.13.14",
crossScalaVersions := Seq("2.12.19", "2.13.14"),
scalacOptions += "-Xsource:3"
scalacOptions += "-Xsource:3"
)

lazy val core = Project("spawning-pool-core", file("spawning-pool-core"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ object SolutionContext {
*/
def apply[A, B](islandId: Int, fitness: A => B, evolver: Evolver[A], mutationRate: Double, population: Seq[A])(
implicit ordering: Ordering[B]
): SolutionContext[A, B] = {
): SolutionContext[A, B] =
new SolutionContext(islandId, fitness, evolver, mutationRate, population, 0)
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class Solver[A, B](

def solve(implicit src: ChromosomeGenerator[A], ec: ExecutionContext): Future[Solutions] =
Future {
evolveFrom { Vector.fill(populationSize)(src.generateChromosome) }
evolveFrom(Vector.fill(populationSize)(src.generateChromosome))
}

def solve(seed: List[A])(implicit ec: ExecutionContext): Future[Solutions] =
Expand Down

0 comments on commit 1991005

Please sign in to comment.