Skip to content

Commit

Permalink
Merge pull request #20 from lenguyenthanh/master
Browse files Browse the repository at this point in the history
Produce bytecode for jdk 17 & remove Validated's extension
  • Loading branch information
ornicar authored Jul 22, 2023
2 parents a6ac569 + 19d526d commit 22f4d91
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ scalacOptions := Seq(
"-indent",
"-rewrite",
"-source:future-migration",
"-Xtarget:17",
"-release:17",
"-Wunused:all"
)
publishTo := Some(Resolver.file("file", new File(sys.props.getOrElse("publishTo", ""))))
4 changes: 0 additions & 4 deletions src/main/scala/extensions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package ornicar.scalalib
import alleycats.Zero
import cats.Eq
import cats.syntax.all.*
import cats.data.Validated
import scala.util.matching.Regex
import pprint.pprintln

Expand Down Expand Up @@ -41,9 +40,6 @@ object extensions:

extension [A](as: Iterable[A]) def mapBy[B](f: A => B): Map[B, A] = as.view.map { a => f(a) -> a }.toMap

extension [E, A](validated: Validated[E, A])
def flatMap[EE >: E, B](f: A => Validated[EE, B]): Validated[EE, B] = validated.andThen(f)

extension [A](seq: Seq[A])
def has(b: A)(using Eq[A]): Boolean = seq.contains(b)

Expand Down

0 comments on commit 22f4d91

Please sign in to comment.