We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
This would simplify the pattern like
enum Foo { A, B, C } fn foo_to_str(f: Foo) -> &'static str { match f { A => "A", B => "B", C => "C" } }
instead of doing all the fancy reflection.