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

fix String::get_slice_count #49504

Closed
wants to merge 1 commit into from
Closed

Conversation

underdoeg
Copy link
Contributor

from what I undestand the current behaviour would always return the actual count +1. get_slice_count should return 0 if no slice was found and not 1. This changes fixes my use case where I tried to parse an URL with a port number 127.0.0.1:8000/test and getting invalid parameter.

get_slice_count should return 0 if no slice was found. This changes fixes my use case where I tried to parse an URL with a port number ```127.0.0.1:8000/test``` and getting invalid parameter.
@underdoeg underdoeg requested a review from a team as a code owner June 11, 2021 07:59
@underdoeg
Copy link
Contributor Author

oh never mind, 1 is correct but the URL checking code is wrong.

@Calinou
Copy link
Member

Calinou commented Jun 11, 2021

Superseded by #49505.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants