Rework char::eq_ignore_ascii_case
parameter type
#57227
Labels
A-str
Area: str and String
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Right now:
This means that
'a'.eq_ignore_ascii_case('b')
doesn't compile. Instead the user must type'a'.eq_ignore_ascii_case(&'b')
. I would like to allow for both without breaking backwards compatibility.One option would be to change the signature to the following:
This would require us to implement
AsRef<char>
forchar
and&char
to facilitate this.The text was updated successfully, but these errors were encountered: