Skip to content

Keywords aren't being lowercased when inserted with diesel :( #722

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

Closed
carols10cents opened this issue May 13, 2017 · 0 comments
Closed

Keywords aren't being lowercased when inserted with diesel :( #722

carols10cents opened this issue May 13, 2017 · 0 comments
Labels
C-bug 🐞 Category: unintended, undesired behavior

Comments

@carols10cents
Copy link
Member

Problem is here where NewKeywords that get inserted aren't using the lowercased keyword:

.map(|s| (s.to_lowercase(), NewKeyword { keyword: *s }))

Discovered while trying to convert more stuff to use diesel.

Tests didn't catch it because the tests are using the non-diesel way of inserting keywords, which does lowercase them :(

This is a problem in production, for example the keywords 2d and 2D: https://crates.io/keywords?sort=alpha

  • 2d 37 crates
  • 2D 14 crates

We'll need to collapse these back down to the lowercased version once this is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

No branches or pull requests

1 participant