Merge pull request #18381 from ktoso/wip-reenable-tests-ktoso

=htp #18361 reenable pending tests ported from spray
This commit is contained in:
Konrad Malawski 2015-09-03 10:23:26 +02:00
commit dfed97818f
2 changed files with 31 additions and 19 deletions

View file

@ -117,6 +117,13 @@ object Marshaller
*/
def opaque[A, B](marshal: A B): Marshaller[A, B] =
strict { value Marshalling.Opaque(() marshal(value)) }
/**
* Helper for creating a [[Marshaller]] combined of the provided `marshal` function
* and an implicit Marshaller which is able to produce the required final type.
*/
def combined[A, B, C](marshal: A B)(implicit m2: Marshaller[B, C]): Marshaller[A, C] =
Marshaller[A, C] { ec a m2.compose(marshal).apply(a)(ec) }
}
//#