Skip to content

Commit

Permalink
Organised imports, scalafix + scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Nov 10, 2024
1 parent cdfa136 commit 1a218e4
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package indigo.benchmarks

import indigo.*

import japgolly.scalajs.benchmark._
import japgolly.scalajs.benchmark.gui._

Expand Down
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package indigo.benchmarks

import indigo.*

import japgolly.scalajs.benchmark._
import japgolly.scalajs.benchmark.gui._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package indigo.benchmarks

import indigo.*

import japgolly.scalajs.benchmark._
import japgolly.scalajs.benchmark.gui._

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package indigo.benchmarks

import indigo.*

import japgolly.scalajs.benchmark._
import japgolly.scalajs.benchmark.gui._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package indigo.benchmarks

import indigo.*
import indigo.syntax.*

import japgolly.scalajs.benchmark._
import japgolly.scalajs.benchmark.gui._

Expand Down
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
8 changes: 4 additions & 4 deletions indigo/indigo/src/main/scala/indigo/shared/Context.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1a218e4

Please sign in to comment.