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

OsStr eq_ignore_ascii_case takes arg by value #81710

Merged
merged 1 commit into from
Feb 5, 2021
Merged

Commits on Feb 3, 2021

  1. OsStr eq_ignore_ascii_case takes arg by value

    Per a comment on rust-lang#70516 this changes `eq_ignore_ascii_case` to take the generic parameter `S: AsRef<OsStr>` by value instead of by reference.
    
    This is technically a breaking change to an unstable method. I think the only way it would break is if you called this method with an explicit type parameter, ie `my_os_str.eq_ignore_ascii_case::<str>("foo")` becomes `my_os_str.eq_ignore_ascii_case::<&str>("foo")`.
    
    Besides that, I believe it is overall more flexible since it can now take an owned `OsString` for example.
    
    If this change should be made in some other PR (like rust-lang#80193) then please just close this.
    TyPR124 authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    4d1efb7 View commit details
    Browse the repository at this point in the history