=http #20687 remove dead code and unused import from Unmarshaller (#20688)

This commit is contained in:
Jakub Kozłowski 2016-06-02 10:57:09 +02:00 committed by Konrad Malawski
parent b9b1bf1749
commit 609fb0ec03
2 changed files with 0 additions and 10 deletions

View file

@ -100,12 +100,6 @@ object Unmarshaller {
unmarshalling.Unmarshaller.firstOf(u1.asScala, u2.asScala, u3.asScala, u4.asScala, u5.asScala)
}
// implicit def asScalaToResponseMarshaller[T](um: Unmarshaller[akka.http.javadsl.model.HttpRequest, T]): FromRequestUnmarshaller[T] =
// um.asScala.contramap[akka.http.scaladsl.model.HttpRequest](_.asJava)
//
// implicit def asScalaEntityMarshaller[T](um: Unmarshaller[akka.http.javadsl.model.RequestEntity, T]): akka.http.scaladsl.marshalling.Marshaller[T, akka.http.scaladsl.model.RequestEntity] =
// um.asScala.map(_.asJava)
private implicit def adaptInputToJava[JI, SI, O](um: unmarshalling.Unmarshaller[SI, O])(implicit mi: JavaMapping[JI, SI]): unmarshalling.Unmarshaller[JI, O] =
um.asInstanceOf[unmarshalling.Unmarshaller[JI, O]] // since guarantee provided by existence of `mi`
@ -117,7 +111,6 @@ trait UnmarshallerBase[-A, B]
* An unmarshaller transforms values of type A into type B.
*/
abstract class Unmarshaller[-A, B] extends UnmarshallerBase[A, B] {
import unmarshalling.Unmarshaller._
implicit def asScala: akka.http.scaladsl.unmarshalling.Unmarshaller[A, B]

View file

@ -22,9 +22,6 @@ trait Unmarshaller[-A, B] extends akka.http.javadsl.server.Unmarshaller[A, B] {
def transform[C](f: ExecutionContext Materializer Future[B] Future[C]): Unmarshaller[A, C] =
Unmarshaller.withMaterializer { implicit ec implicit mat a f(ec)(mat)(this(a)) }
// def contramap[I](f: I A): Unmarshaller[I, B] =
// Unmarshaller.strict(i f(i)).flatMap(ec mat apply(_)(ec, mat))
def map[C](f: B C): Unmarshaller[A, C] =
transform(implicit ec _ _.fast map f)