cabol / ex_shards

Elixir wrapper for cabol/shards .

Home Page:https://hexdocs.pm/ex_shards/api-reference.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spec suggests otherwise

princemaple opened this issue · comments

Hi @cabol ,

https://github.com/cabol/ex_shards/blob/master/lib/ex_shards.ex#L91
This line of spec seems to be wrong.

In my test it seems to return value directly, not a tuple. I'm not sure what the intended behavior is. Also, when would it ever be [value]?

Hi @princemaple, you're right, there is an error in that spec, I'll fix it right away.

On other hand, it returns [value] when you have a bag or duplicate_bag tables.

@princemaple the spec is fixed -> https://github.com/cabol/ex_shards/blob/master/lib/ex_shards.ex#L91

Let me know if we can close this issue, stay tuned!

Thanks !!

Thank you!

Please take a look at #6 also :)