diff options
author | adamw <adam@warski.org> | 2017-11-13 13:40:30 +0100 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-11-13 13:40:30 +0100 |
commit | a0fdfa6f6114aec289e46c4261522244b160e522 (patch) | |
tree | b6177038e5c8ab36b13cf8b006b246427aa7425c /core | |
parent | 927c7c73b9766e825e1949667219ee367f342054 (diff) | |
download | sttp-a0fdfa6f6114aec289e46c4261522244b160e522.tar.gz sttp-a0fdfa6f6114aec289e46c4261522244b160e522.tar.bz2 sttp-a0fdfa6f6114aec289e46c4261522244b160e522.zip |
Adding explicit type annotations
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala b/core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala index b894e77..553afff 100644 --- a/core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala +++ b/core/src/main/scala/com/softwaremill/sttp/testing/SttpBackendStub.scala @@ -33,7 +33,8 @@ class SttpBackendStub[R[_], S] private (rm: MonadError[R], new WhenRequest(p) def whenRequestMatchesPartial( - partial: PartialFunction[Request[_, _], Response[_]]) = { + partial: PartialFunction[Request[_, _], Response[_]]) + : SttpBackendStub[R, S] = { val m = Matcher(partial) val vector: Vector[Matcher[_]] = matchers :+ m new SttpBackendStub(rm, vector, fallback) @@ -125,7 +126,8 @@ object SttpBackendStub { } private object Matcher { - def apply[T](p: Request[T, _] => Boolean, response: => Response[T]) = { + def apply[T](p: Request[T, _] => Boolean, + response: => Response[T]): Matcher[T] = { new Matcher[T]({ case r if p(r) => response }) |