-
Notifications
You must be signed in to change notification settings - Fork 16
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
Simplify pretty_print_contract and introduce newline between contract heads #4
Conversation
lib/erlex.ex
Outdated
|
||
head = | ||
head = | ||
if tail != [] do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you flip these clauses so this is a positive conditional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually case is probably more expressive here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either case
or Enum.empty?/1
. Both are fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with 1f8c75e.
This looks good after that one minor comment. I'll get this merged and deployed to Hex later this evening. Thanks for taking care of this! |
Curious why circle didn't run... I'll have to look into that. |
This merge request simplifies
pretty_print_contract/1,3
by reducing the case without multiple contracts/heads to the case of multiple contracts. It then adds a newline to separate multiple contracts.Fix #3.