diff options
author | vlad <vlad@driver.xyz> | 2017-06-14 14:46:19 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-06-14 14:46:19 -0700 |
commit | 7b8ac40ab6501ec53c5a55962fe4a3d54666ae8d (patch) | |
tree | 211a6a544facb278807d47cc3d91f0cee59f2466 /src/main/scala/xyz/driver/pdsuicommon/logging | |
parent | 59aababea4a8856ac972fe452b14003f82fe3706 (diff) | |
download | rest-query-0.1.4.tar.gz rest-query-0.1.4.tar.bz2 rest-query-0.1.4.zip |
Update for recent PDS UI changesv0.1.4
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuicommon/logging')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuicommon/logging/Implicits.scala | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/main/scala/xyz/driver/pdsuicommon/logging/Implicits.scala b/src/main/scala/xyz/driver/pdsuicommon/logging/Implicits.scala index 84cf31e..e1660e2 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/logging/Implicits.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/logging/Implicits.scala @@ -3,7 +3,7 @@ package xyz.driver.pdsuicommon.logging import java.io.File import java.net.{URI, URL} import java.nio.file.Path -import java.time.LocalDateTime +import java.time.{LocalDate, LocalDateTime} import java.util.UUID import scala.concurrent.duration.Duration @@ -29,23 +29,27 @@ trait Implicits { implicit def localDateTimeToPhiString(x: LocalDateTime): PhiString = Unsafe(x.toString) + implicit def localDateToPhiString(x: LocalDate): PhiString = Unsafe(x.toString) + implicit def durationToPhiString(x: Duration): PhiString = Unsafe(x.toString) implicit def uuidToPhiString(x: UUID): PhiString = Unsafe(x.toString) - implicit def tuple2ToPhiString[T1, T2](x: (T1, T2))(implicit inner1: T1 => PhiString, - inner2: T2 => PhiString): PhiString = x match { + implicit def tuple2ToPhiString[T1, T2](x: (T1, T2)) + (implicit inner1: T1 => PhiString, + inner2: T2 => PhiString): PhiString = x match { case (a, b) => phi"($a, $b)" } - implicit def tuple3ToPhiString[T1, T2, T3](x: (T1, T2, T3))(implicit inner1: T1 => PhiString, - inner2: T2 => PhiString, - inner3: T3 => PhiString): PhiString = x match { + implicit def tuple3ToPhiString[T1, T2, T3](x: (T1, T2, T3)) + (implicit inner1: T1 => PhiString, + inner2: T2 => PhiString, + inner3: T3 => PhiString): PhiString = x match { case (a, b, c) => phi"($a, $b, $c)" } implicit def optionToPhiString[T](opt: Option[T])(implicit inner: T => PhiString): PhiString = opt match { - case None => phi"None" + case None => phi"None" case Some(x) => phi"Some($x)" } |