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

WebjarService: Simplify code #2542

Merged
merged 1 commit into from
May 28, 2019

Conversation

diesalbla
Copy link
Contributor

  • Replace OptionT methods with direct style (function calls) and
    pattern matching, using the Option type most of the time.
  • Replace Option.map and Option.collect by pattern-matching on Option ADT.

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't find it any easier to read, but it saves a few allocations. Mild 👍

@diesalbla
Copy link
Contributor Author

I have changed the code a little bit, to spread it vertically, and also to fix a non-exhaustive match.

- Replace OptionT methods with direct style (function calls) and
   pattern matching, using the `Option` type most of the time.
@rossabaker rossabaker merged commit 43f2461 into http4s:master May 28, 2019
@diesalbla diesalbla deleted the webjarservice_simplify branch May 30, 2019 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants