From 1a218e4b42f89c6575c577b37d28a0df36c33c0b Mon Sep 17 00:00:00 2001 From: davesmith00000 Date: Sun, 10 Nov 2024 14:14:28 +0000 Subject: [PATCH] Organised imports, scalafix + scalafmt --- .../main/scala/indigo/benchmarks/BatchBenchmarks.scala | 1 - .../indigo/benchmarks/BoundaryLocatorBenchmarks.scala | 7 +++---- .../src/main/scala/indigo/benchmarks/Caching.scala | 6 +++--- .../src/main/scala/indigo/benchmarks/Collisions.scala | 1 - .../src/main/scala/indigo/benchmarks/LineBenchmarks.scala | 1 - .../src/main/scala/indigo/benchmarks/Main.scala | 2 +- .../scala/indigo/benchmarks/PhysicsWorldBenchmarks.scala | 3 +-- .../main/scala/indigo/benchmarks/QuadTreeBenchmarks.scala | 1 - .../indigo/benchmarks/SignalFunctionBenchmarks.scala | 1 - .../main/scala/indigo/benchmarks/SimpleComparisons.scala | 7 +++---- indigo/indigo/src/main/scala/indigo/shared/Context.scala | 8 ++++---- 11 files changed, 15 insertions(+), 23 deletions(-) diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/BatchBenchmarks.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/BatchBenchmarks.scala index dcc5f7c18..2a7133656 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/BatchBenchmarks.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/BatchBenchmarks.scala @@ -1,7 +1,6 @@ package indigo.benchmarks import indigo.* - import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/BoundaryLocatorBenchmarks.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/BoundaryLocatorBenchmarks.scala index f7585f422..6f35c0171 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/BoundaryLocatorBenchmarks.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/BoundaryLocatorBenchmarks.scala @@ -1,12 +1,11 @@ package indigo.benchmarks import indigo.* - +import indigo.platform.assets.DynamicText +import indigo.shared.AnimationsRegister +import indigo.shared.FontRegister import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ -import indigo.shared.FontRegister -import indigo.shared.AnimationsRegister -import indigo.platform.assets.DynamicText object BoundaryLocatorBenchmarks: diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/Caching.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/Caching.scala index 76901d1bc..95c3f83f3 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/Caching.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/Caching.scala @@ -1,11 +1,11 @@ package indigo.benchmarks import indigo.* - +import indigo.facades.WeakMap +import indigo.shared.QuickCache import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ -import indigo.shared.QuickCache -import indigo.facades.WeakMap + import scala.scalajs.js object Caching: diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/Collisions.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/Collisions.scala index e7a8dc459..bc7b0bd19 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/Collisions.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/Collisions.scala @@ -1,7 +1,6 @@ package indigo.benchmarks import indigo.* - import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/LineBenchmarks.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/LineBenchmarks.scala index 11fe6ae03..3064ec432 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/LineBenchmarks.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/LineBenchmarks.scala @@ -1,7 +1,6 @@ package indigo.benchmarks import indigo.* - import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/Main.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/Main.scala index b2c7d6e77..17476804e 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/Main.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/Main.scala @@ -1,7 +1,7 @@ package indigo.benchmarks -import org.scalajs.dom.document import japgolly.scalajs.benchmark.gui.BenchmarkGUI +import org.scalajs.dom.document import scala.scalajs.js.annotation.JSExportTopLevel diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/PhysicsWorldBenchmarks.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/PhysicsWorldBenchmarks.scala index 22b901648..87d9d2130 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/PhysicsWorldBenchmarks.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/PhysicsWorldBenchmarks.scala @@ -1,9 +1,8 @@ package indigo.benchmarks import indigo.* -import indigo.syntax.* import indigo.physics.* - +import indigo.syntax.* import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/QuadTreeBenchmarks.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/QuadTreeBenchmarks.scala index db7926228..906ddf75e 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/QuadTreeBenchmarks.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/QuadTreeBenchmarks.scala @@ -1,7 +1,6 @@ package indigo.benchmarks import indigo.* - import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/SignalFunctionBenchmarks.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/SignalFunctionBenchmarks.scala index 30be73b19..33bcc7506 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/SignalFunctionBenchmarks.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/SignalFunctionBenchmarks.scala @@ -2,7 +2,6 @@ package indigo.benchmarks import indigo.* import indigo.syntax.* - import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ diff --git a/indigo/benchmarks/src/main/scala/indigo/benchmarks/SimpleComparisons.scala b/indigo/benchmarks/src/main/scala/indigo/benchmarks/SimpleComparisons.scala index 0e30ec59d..bdf282af8 100644 --- a/indigo/benchmarks/src/main/scala/indigo/benchmarks/SimpleComparisons.scala +++ b/indigo/benchmarks/src/main/scala/indigo/benchmarks/SimpleComparisons.scala @@ -1,12 +1,11 @@ package indigo.benchmarks import indigo.* - +import indigo.platform.assets.DynamicText +import indigo.shared.AnimationsRegister +import indigo.shared.FontRegister import japgolly.scalajs.benchmark._ import japgolly.scalajs.benchmark.gui._ -import indigo.shared.FontRegister -import indigo.shared.AnimationsRegister -import indigo.platform.assets.DynamicText object SimpleComparisons: diff --git a/indigo/indigo/src/main/scala/indigo/shared/Context.scala b/indigo/indigo/src/main/scala/indigo/shared/Context.scala index d67252e5e..218b690a5 100644 --- a/indigo/indigo/src/main/scala/indigo/shared/Context.scala +++ b/indigo/indigo/src/main/scala/indigo/shared/Context.scala @@ -113,14 +113,14 @@ object Context: _captureScreen: Batch[ScreenCaptureConfig] => Batch[Either[String, AssetType.Image]] ): Services = new Services: - def bounds: Services.Bounds = Bounds(boundaryLocator) - def random: Services.Random = Random(_random) + def bounds: Services.Bounds = Bounds(boundaryLocator) + def random: Services.Random = Random(_random) def screen: Services.Screen = Screen(_captureScreen) def noop: Services = new Services: - def bounds: Bounds = Bounds.noop - def random: Random = Random.noop + def bounds: Bounds = Bounds.noop + def random: Random = Random.noop def screen: Screen = Screen.noop trait Bounds: