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

FileService: remove OptionT from inner methods. #2555



Copy link

@diesalbla diesalbla commented May 5, 2019

In the inner methods getPartialContentFile and getFile, the OptionT wrapper serves no purpose, since no special method is used. We remove its from those functions, and put it in the call places, where they are actually used.

In the inner methods `getPartialContentFile` and `getFile`, the
OptionT wrapper is serving no purpose, since no special method is
used. We therefore move their use to the call places, which is
where the OptionT methods are actually used.
@diesalbla diesalbla force-pushed the FileService_getPartialContentFile branch from 72165a0 to 9018d8a May 5, 2019
Copy link

@rossabaker rossabaker left a comment

Lukewarm 👍. It gets a slight amount of pure code (the .get(Range)) out of the sync context and saves a couple allocations in code where the file system access will dominate anyway.


@rossabaker rossabaker merged commit 2c0507d into http4s:master May 28, 2019
1 check passed
@diesalbla diesalbla deleted the FileService_getPartialContentFile branch May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants