shnewto / bnf

Parse BNF grammar definitions
MIT License
258 stars 22 forks source link

Implement format display instead of ToString #3

Closed CrockAgile closed 7 years ago

CrockAgile commented 7 years ago

Previously the BNF types implemented the ToString trait. However the rust convention is to implement fmt::Display instead because it covers wider use cases and automatically implements the ToString trait as well. Now the types support format as well as to_string.

Apologies also that is change is bundled with rustfmt changes. I could not get vscode to play nice with formatting.

shnewto commented 7 years ago

This is great! Thanks!