Skip to content
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

feat(Text): Add a From<Cow<str>> impl for Text #471

Merged
merged 2 commits into from May 22, 2021

Conversation

eminence
Copy link
Contributor

This is useful when you have a list of Cow<str> and you want to use it in a Row.

@fdehau
Copy link
Owner

fdehau commented May 2, 2021

Hey 👋 . Could you add a test (maybe a doc test) to make sure this case is covered going forward ?

@eminence
Copy link
Contributor Author

eminence commented May 5, 2021

Sure! I pushed a new commit that add two examples. One is in the docs for Cell, but this was kinda boring so I also added another example in the docs for Row (which happen to mirror my own personal use case):

Row::new(vec![
    Cow::Borrowed("hello"),
    Cow::Owned("world".to_uppercase()),
]);

@fdehau fdehau merged commit 24396d9 into fdehau:master May 22, 2021
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants