Skip to content

Commit

Permalink
use intellij suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeshav committed Apr 14, 2021
1 parent aa03806 commit 684bb9a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/scala/net/cakesolutions/config/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,10 @@ package object config extends FicusInstances {
implicit def toRefinementType[Base, Refinement](
implicit reader: ValueReader[Base],
witness: Validate[Base, Refinement]
): ValueReader[Base Refined Refinement] = new ValueReader[Base Refined Refinement] {
override def read(config: Config, path: String): Base Refined Refinement = {
refineV[Refinement](config.as[Base](path)) match {
case Left(err) => throw new RuntimeException(err)
case Right(value) => value
}
): ValueReader[Base Refined Refinement] = (config: Config, path: String) => {
refineV[Refinement](config.as[Base](path)) match {
case Left(err) => throw new RuntimeException(err)
case Right(value) => value
}
}

Expand Down

0 comments on commit 684bb9a

Please sign in to comment.