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 runtime parsing #6
Conversation
2 similar comments
this was needed just for testing, so whatever...
1 similar comment
1 similar comment
Thanks! |
im not using it right now, but i need this in the future |
What's the problem with parse_str that can fail? |
I'm fine with adding more api (such as the tuple one) and more tests with it but I think current sets should stay as is and parse_str should stay too |
parse_str can fail if you put something like this str into it: "Busybulbasaur". But this is completely unnecessary as parse_str can only work on
the from is impled for |
I actually think that both parse_str and the tuple form should fail more often, when the input is not present in the arrays of pokemon and adjectives |
yeah, thought about that too, but discarded that idea because of the complexity. you would need two large match expressions for the pokemons and adjectives, it's actually doable if done with macros, but again: i dont think it's worth the effort for a feature which is used purely for testing. |
After internal discussions we actually ported the tests to to_string(), this makes them stick closer to what the project is supposed to actually do. I thus dropped parse_str as it was no longer needed. Your doc improvements are nice though, care to rebase those? |
What's with the benches? i also removed all eq benches in this pr |
i removed the runtime parsing function. reasons for that:
&'static str
s, so the range of use is reduced anyway to static stringsalso changed: