!htp,jso,xml #18064 remove implicit parameters of Unmarshaller instances
This commit is contained in:
parent
9a3d8104fd
commit
3b7d308545
19 changed files with 186 additions and 165 deletions
|
|
@ -4,16 +4,18 @@
|
|||
|
||||
package docs.http.scaladsl
|
||||
|
||||
import akka.stream.{ Materializer, ActorMaterializer }
|
||||
import akka.stream.testkit.AkkaSpec
|
||||
|
||||
class UnmarshalSpec extends AkkaSpec {
|
||||
|
||||
"use unmarshal" in {
|
||||
import akka.http.scaladsl.unmarshalling.Unmarshal
|
||||
import system.dispatcher
|
||||
import system.dispatcher // ExecutionContext
|
||||
implicit val materializer: Materializer = ActorMaterializer()
|
||||
|
||||
import scala.concurrent.Await
|
||||
import scala.concurrent.duration._ // ExecutionContext
|
||||
import scala.concurrent.duration._
|
||||
|
||||
val intFuture = Unmarshal("42").to[Int]
|
||||
val int = Await.result(intFuture, 1.second) // don't block in non-test code!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue