-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use slicing syntax for str/String #17502
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
Comments
On it :) |
We removed this for a reason, what's the justification for bringing this back? |
Did we? IIRC, we removed string indexing. But, we still have unsugared string slicing.
I'd say that the main reason is that But I'm not sure about the usefulness of the sugared versions of the other three methods: |
Oh oh, I was thinking of indexing. Carry on 😄 |
* Use ... instead of .. when matching a range, in preparation for rust-lang/rust#17584 (may not be complete). * Use the new slicing syntax (a[], a[x..y]) if possible. (Currently String::as_slice() is blocked by rust-lang/rust#17502.) * Change deprecated String::push_char() to String::push().
Arf, I've been too slow ^^ |
Need to implement ops::Slice
Happy to mentor.
The text was updated successfully, but these errors were encountered: