Remove manual mapping in FromStr
implementation for StorySelector
(#3018)
This PR removes the need for writing manual mappings in the `FromStr` implementation for the `StorySelector` enum used in the storybook CLI. We are now using the [`EnumString`](https://docs.rs/strum/0.25.0/strum/derive.EnumString.html) trait from `strum` to automatically derive snake_cased names for the enums. This will cut down on some of the manual work needed to wire up more stories to the storybook. Release Notes: - N/A
This commit is contained in:
parent
71c1e36d1e
commit
8b6e982495
3 changed files with 47 additions and 9 deletions
|
@ -17,6 +17,7 @@ rust-embed.workspace = true
|
|||
serde.workspace = true
|
||||
settings = { path = "../settings" }
|
||||
simplelog = "0.9"
|
||||
strum = { version = "0.25.0", features = ["derive"] }
|
||||
theme = { path = "../theme" }
|
||||
ui = { path = "../ui" }
|
||||
util = { path = "../util" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue