Skip to content

Commit

Permalink
http4s client: prefix identity with Predef
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilvasc authored and blast-hardcheese committed Apr 16, 2019
1 parent 569195b commit 95f8c56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ object Http4sClientGenerator {
resp.value.fold[Case](
p"case ${resp.statusCodeName}(_) => F.pure($responseCompanionTerm.$responseTerm)"
) { _ =>
p"case ${resp.statusCodeName}(resp) => ${Term.Name(s"$methodName${resp.statusCodeName}Decoder")}.decode(resp, strict = false).fold(throw _, identity).map($responseCompanionTerm.$responseTerm)"
p"case ${resp.statusCodeName}(resp) => ${Term.Name(s"$methodName${resp.statusCodeName}Decoder")}.decode(resp, strict = false).fold(throw _, Predef.identity).map($responseCompanionTerm.$responseTerm)"
}
} :+ p"case resp => F.raiseError(UnexpectedStatus(resp.status))"
// Get the response type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class BasicTest extends FunSuite with Matchers with SwaggerSpecRunner {
val req = Request[F](method = Method.GET, uri = Uri.unsafeFromString(host + basePath + "/baz"), headers = Headers(allHeaders))
httpClient.fetch(req)({
case Ok(resp) =>
getBazOkDecoder.decode(resp, strict = false).fold(throw _, identity).map(GetBazResponse.Ok)
getBazOkDecoder.decode(resp, strict = false).fold(throw _, Predef.identity).map(GetBazResponse.Ok)
case resp =>
F.raiseError(UnexpectedStatus(resp.status))
})
Expand Down

0 comments on commit 95f8c56

Please sign in to comment.