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

Improvement #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Improvement #41

wants to merge 2 commits into from

Conversation

c4710n
Copy link

@c4710n c4710n commented Aug 2, 2022

  1. fix a compile warning
  2. remove useless config

The details can be found in commit messages.

The content of warning:

Compiling 1 file (.ex)
warning: incompatible types:

    map() !~ atom()

in expression:

    # lib/params.ex:128
    module.__changeset__

where "module" was given the type atom() in:

    # lib/params.ex:126
    is_atom(module)

where "module" was given the type map() (due to calling var.field) in:

    # lib/params.ex:128
    module.__changeset__

HINT: "var.field" (without parentheses) implies "var" is a map() while "var.fun()" (with parentheses) implies "var" is an atom()

Conflict found at
  lib/params.ex:128: Params.optional/1
As [Library
Guidelines](https://hexdocs.pm/elixir/1.13.4/library-guidelines.html#avoid-application-configuration)
suggested, a library should avoid application configuration. And, the content of config is commented.

IMHO, there's no reason to keep them.
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.

None yet

1 participant