Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunk Aggregator: rework #2599

Merged
merged 1 commit into from Jun 6, 2019

Conversation

@diesalbla
Copy link
Contributor

commented May 27, 2019

  • Change the inner function removeChunkedTransferEncoding from
    function of Response to Response (which was asking for an
    unused Functor parameter) into a Headers to Headers function.

  • Since List.flatMap would allocates two objects for each element of
    the result list, we use instead a mutable ListBuffer and a foreach.
    This "imperative" code is no longer than the "functional" one.

@diesalbla diesalbla force-pushed the diesalbla:chunkaggregator_reorganise branch from ef0ef21 to 9a6ebea May 28, 2019

Chunk Aggregator: reorganise implementation
- Change the inner function removeChunkedTransferEncoding from
  function of `Response` to `Response` (which was asking for an
  unused `Functor` parameter) into a `Headers` to `Headers` function.

- Since `List.flatMap` would allocates two objects for each element of
  the result list, we use instead a mutable ListBuffer and a foreach.
  This "imperative" code is no longer than the "functional" one.

@diesalbla diesalbla force-pushed the diesalbla:chunkaggregator_reorganise branch from 9a6ebea to 7ad5a8c May 28, 2019

@diesalbla diesalbla changed the title Chunk Aggregator: reorganise implementation Chunk Aggregator: rework May 28, 2019

@aeons aeons merged commit 3f93516 into http4s:master Jun 6, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@diesalbla diesalbla deleted the diesalbla:chunkaggregator_reorganise branch Jun 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.