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

Consider impl trait FromStr for KString #17

Closed
mateuszkj opened this issue Oct 27, 2021 · 1 comment · Fixed by #18
Closed

Consider impl trait FromStr for KString #17

mateuszkj opened this issue Oct 27, 2021 · 1 comment · Fixed by #18
Labels
enhancement Improve the expected

Comments

@mateuszkj
Copy link

mateuszkj commented Oct 27, 2021

For example crate StructOpts uses trait FromStr

liquid-rust version:
rust version:rustc 1.56.0 (09c42c458 2021-10-18)
OS: Linux mk-Precision-Tower-7910 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

@epage
Copy link
Member

epage commented Oct 27, 2021

As a workaround until this is added, you should be able to do:

#[structopt(parser(from_str=KString::from_ref)]

@epage epage added the enhancement Improve the expected label Oct 27, 2021
dalegaard added a commit to dalegaard/kstring that referenced this issue Nov 5, 2021
This implements FromStr for `KString` and `KStringCow`.

Fixes cobalt-org#17.
dalegaard added a commit to dalegaard/kstring that referenced this issue Nov 5, 2021
This implements FromStr for `KString` and `KStringCow`.

Fixes cobalt-org#17.
@dalegaard dalegaard mentioned this issue Nov 5, 2021
1 task
dalegaard added a commit to dalegaard/kstring that referenced this issue Nov 5, 2021
This implements FromStr for `KString` and `KStringCow`.

Fixes cobalt-org#17.
dalegaard added a commit to dalegaard/kstring that referenced this issue Nov 5, 2021
This implements FromStr for `KString` and `KStringCow`.

Fixes cobalt-org#17.
@epage epage closed this as completed in #18 Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve the expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants