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

Remove duplicate struct keys #575

Merged

Conversation

dkulchenko
Copy link
Contributor

@dkulchenko dkulchenko commented Feb 18, 2020

collection_method is specified twice in the typespecs and struct definition for subscriptions/invoice and subscriptions/subscription, leading to a compile-time warning:

warning: duplicate key :collection_method found in struct
  (elixir 1.10.0) lib/kernel/utils.ex:119: Kernel.Utils.warn_on_duplicate_struct_key/1
  (elixir 1.10.0) lib/kernel/utils.ex:98: Kernel.Utils.defstruct/2
  lib/stripe/subscriptions/subscription.ex:56: (module)
  (elixir 1.10.0) src/elixir_compiler.erl:75: :elixir_compiler.dispatch/4
  (elixir 1.10.0) src/elixir_compiler.erl:60: :elixir_compiler.compile/3

collection_method is specified twice in the typespecs and struct definition, leading to a compile-time warning:

warning: duplicate key :collection_method found in struct
  (elixir 1.10.0) lib/kernel/utils.ex:119: Kernel.Utils.warn_on_duplicate_struct_key/1
  (elixir 1.10.0) lib/kernel/utils.ex:98: Kernel.Utils.defstruct/2
  lib/stripe/subscriptions/subscription.ex:56: (module)
  (elixir 1.10.0) src/elixir_compiler.erl:75: :elixir_compiler.dispatch/4
  (elixir 1.10.0) src/elixir_compiler.erl:60: :elixir_compiler.compile/3
@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.202% when pulling ffe1d9f on dkulchenko:fix-duplicate-struct-keys into 88deb5a on code-corps:master.

Copy link
Collaborator

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

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

Copy link
Collaborator

@snewcomer snewcomer left a comment

Choose a reason for hiding this comment

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

🎉

@snewcomer snewcomer merged commit 7e65007 into beam-community:master Feb 21, 2020
@dkulchenko dkulchenko deleted the fix-duplicate-struct-keys branch February 21, 2020 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants