-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
rollup of several outstanding PRs + bump MSRV to Rust 1.73 #198
Conversation
This is a pedantic lint, but it removes a transmute where a cast will do. The code is safe for the same reasons the transmute is safe: `BStr` is a repr transparent wrapper around `[u8]`.
Add instances for `[u8; N]` and `&[u8; N]`, for convenience. Closes #191
A build on nightly currently produces this: warning: elided lifetime has a name --> src/escape_bytes.rs:15:43 | 14 | impl<'a> EscapeBytes<'a> { | -- lifetime `'a` declared here 15 | pub(crate) fn new(bytes: &'a [u8]) -> EscapeBytes { | ^^^^^^^^^^^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default Fix that by changing `EscapeBytes` to `Self`, which constrains the lifetime. Closes #192
This isn't strictly necessary, but I'm doing a minor version bump and might as well move the trains along.
This PR is on crates.io in |
@BurntSushi #189 I think is a breaking change. The change in casing of Given one of the documented uses of |
`bstr` 1.11.x updated the debug format of `BStr` to be all lowercase. See: - BurntSushi/bstr#189 - BurntSushi/bstr#198 (comment)
I think it's a pretty strong convention that the output of I do agree that the And the fix here is making the output more consistent. I certainly meant for the case of the hex escapes to all be the same. But it wasn't. |
cool, thanks for the detailed explanation! I'll update my tests 🫡 |
`bstr` 1.11.x updated the debug format of `BStr` to be all lowercase. See: - BurntSushi/bstr#189 - BurntSushi/bstr#198 (comment)
This is a rollup of a few outstanding PRs.
I'll do a minor version bump, so I'll take advantage of that opportunity and bump the MSRV to Rust 1.73.
Closes #160, Closes #189, Closes #191, Closes #192, Closes #197