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

Eliminate an allocation from Literal::byte_string #328

Merged
merged 2 commits into from May 6, 2022
Merged

Commits on May 6, 2022

  1. Eliminate an allocation from Literal::byte_string

        error: `format!(..)` appended to existing `String`
           --> src/fallback.rs:879:22
            |
        879 |                 _ => escaped.push_str(&format!("\\x{:02X}", b)),
            |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            |
            = note: `-D clippy::format-push-string` implied by `-D clippy::all`
            = help: consider using `write!` to avoid the extra allocation
            = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_push_string
    dtolnay committed May 6, 2022
    Copy the full SHA
    16c4bb4 View commit details
    Browse the repository at this point in the history
  2. Restore support for rust pre-1.33

        error[E0658]: renaming imports with `_` is unstable (see issue 48216)
         --> src/fallback.rs:7:38
          |
        7 | use std::fmt::{self, Debug, Display, Write as _};
          |                                      ^^^^^^^^^^
    dtolnay committed May 6, 2022
    Copy the full SHA
    d307f56 View commit details
    Browse the repository at this point in the history