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

Add AsStr trait for convert_error #1050

Closed
wants to merge 1 commit into from

Conversation

dalance
Copy link
Contributor

@dalance dalance commented Oct 15, 2019

convert_error function takes &str only. So if I use an input type except &str like nom_locate::LocatedSpanEx<&str, ()>, convert_error can't be used.

This PR add AsStr trait to provide as_str().
Hereby any input type implementing AsStr can be used at convert_error.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.2%) to 87.489% when pulling f10d1c8 on dalance:as_str_trait into 8517064 on Geal:master.

@Geal
Copy link
Collaborator

Geal commented Aug 30, 2020

hello, I'll close this in favor of b2ed755 which uses a more standard trait. Thanks for the push anyway!

@Geal Geal closed this Aug 30, 2020
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

3 participants