elixir-mongo / mongodb

MongoDB driver for Elixir
Apache License 2.0
568 stars 157 forks source link

ElixirLS Dialyzer Issues #378

Closed briankariuki closed 1 year ago

briankariuki commented 1 year ago

I'm getting this error on my project. I'm using version 1.0.0. Also when I call. Mongo.find_one() I get warnings regarding the return type of the function

Screenshot 2023-06-17 at 18 16 05
ankhers commented 1 year ago

I believe the issue is because you are using 'users' as your collection name. This is a charlist in Elixir. The expected type is a binary. If you change it to "users" (double quotes), it may resolve the warning.

ankhers commented 1 year ago

I'm going to close this because there has been no response. If this is still an issue after making my suggested change above, please feel free to reopen with additional information.