From b872ee2649c7b56df413fbde746ee68312c17abd Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Sun, 19 Nov 2017 23:29:03 -0800 Subject: Apply new formatting --- src/main/scala/xyz/driver/core/rest/RestService.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/scala/xyz/driver/core/rest/RestService.scala') diff --git a/src/main/scala/xyz/driver/core/rest/RestService.scala b/src/main/scala/xyz/driver/core/rest/RestService.scala index aed8d28..c1d883a 100644 --- a/src/main/scala/xyz/driver/core/rest/RestService.scala +++ b/src/main/scala/xyz/driver/core/rest/RestService.scala @@ -24,11 +24,11 @@ trait RestService extends Service { OptionT[Future, Unit](request.flatMap(_.to[String]).map(_ => Option(()))) protected def optionalResponse[T](request: Future[Unmarshal[ResponseEntity]])( - implicit um: Unmarshaller[ResponseEntity, Option[T]]): OptionT[Future, T] = + implicit um: Unmarshaller[ResponseEntity, Option[T]]): OptionT[Future, T] = OptionT[Future, T](request.flatMap(_.fold(Option.empty[T]))) protected def listResponse[T](request: Future[Unmarshal[ResponseEntity]])( - implicit um: Unmarshaller[ResponseEntity, List[T]]): ListT[Future, T] = + implicit um: Unmarshaller[ResponseEntity, List[T]]): ListT[Future, T] = ListT[Future, T](request.flatMap(_.fold(List.empty[T]))) protected def jsonEntity(json: JsValue): RequestEntity = -- cgit v1.2.3