checkiz / elixir-mongo

MongoDB driver for Elixir
MIT License
101 stars 31 forks source link

Fail in unsupported Enumerable protocol functions according to documentation #24

Closed michalmuskala closed 8 years ago

michalmuskala commented 9 years ago

As documented in http://elixir-lang.org/docs/stable/elixir/Enumerable.html#member?/2 unimplemented functions should return {:error, __MODULE__}, and then a default implementation would be used.

Also there is no need to add :for key in defimpl if it's inside the module that it is implementing.