# Remove manual mapping in \`FromStr\` implementation for \`StorySelector\` \(\#3018\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8b6e982495aabf8396cae6fd93ff312d6c525fab)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8b6e982495aabf8396cae6fd93ff312d6c525fab

Requested commit: 8b6e982495aabf8396cae6fd93ff312d6c525fab

Commit: 8b6e982495aabf8396cae6fd93ff312d6c525fab

Tree: 9ed8f9be7e72012d7ccbbd0d6848dc42cbe4b296

Author: Marshall Bowers

Committer: GitHub

## Message

```
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
```

## Parents

- [71c1e36d1e436631af212b593048a184d2122885](https://git.cafe/gitcafe/zed/commit/71c1e36d1e436631af212b593048a184d2122885?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8b6e982495aabf8396cae6fd93ff312d6c525fab?format=markdown)
