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

Implement DerefMut for String #26241

Merged
merged 7 commits into from
Jul 14, 2015
Merged

Commits on Jul 13, 2015

  1. Implement DerefMut for String

    `&mut str` is rarely useful, but it is for e.g.
    `AsciiExt::make_ascii_lowercase`.
    SimonSapin committed Jul 13, 2015
    Configuration menu
    Copy the full SHA
    2d34a53 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    304f545 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90d61d8 View commit details
    Browse the repository at this point in the history
  4. Implement IndexMut for String and str.

    ... matching the existing Index impls.
    There is no reason not to if String implement DerefMut.
    
    The code removed in `src/librustc/middle/effect.rs` was added in rust-lang#9750
    to prevent things like `s[0] = 0x80` where `s: String`,
    but I belive became unnecessary when the Index(Mut) traits were introduced.
    SimonSapin committed Jul 13, 2015
    Configuration menu
    Copy the full SHA
    f900551 View commit details
    Browse the repository at this point in the history
  5. Add str::split_at_mut

    SimonSapin committed Jul 13, 2015
    Configuration menu
    Copy the full SHA
    7469914 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    eb99f0e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3226858 View commit details
    Browse the repository at this point in the history