Skip to content

Commit

Permalink
refactor: Clean up imports of borer.test and example a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
sirthias committed Jan 25, 2024
1 parent d1ed618 commit 9348ca4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
3 changes: 1 addition & 2 deletions borer/test/src/io/github/iltotore/iron/BorerSuite.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package io.github.iltotore.iron

import io.github.iltotore.iron.constraint.all.*
import io.bullet.borer.{Encoder, Json}
import io.github.iltotore.iron.borer.given
import utest.*
import io.bullet.borer.{Encoder, Json}

object BorerSuite extends TestSuite:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.iltotore.iron

import io.github.iltotore.iron.*
import io.github.iltotore.iron.RefinedTypeOps
import io.github.iltotore.iron.constraint.numeric.Positive

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.github.iltotore.iron.formBorer
package io.github.iltotore.iron.borerSerialization

import io.bullet.borer.Codec
import io.bullet.borer.derivation.MapBasedCodecs
import io.bullet.borer.derivation.MapBasedCodecs.*
import io.github.iltotore.iron.constraint.all.*
import io.github.iltotore.iron.{*, given}
import io.github.iltotore.iron.*
import io.github.iltotore.iron.borer.given // this enables borer <-> iron integration

type Username = (Alphanumeric & MinLength[3] & MaxLength[10]) DescribedAs
Expand All @@ -19,7 +19,4 @@ case class Account(
name: String :| Username,
password: String :| Password,
age: Int :| Age
)

object Account:
given Codec[Account] = MapBasedCodecs.deriveCodec
) derives Codec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.iltotore.iron.formBorer
package io.github.iltotore.iron.borerSerialization

import io.bullet.borer.{Borer, Json}
import io.github.iltotore.iron.{*, given}
import io.github.iltotore.iron.*

@main def main: Unit =

Expand Down

0 comments on commit 9348ca4

Please sign in to comment.