Bump rust to 1.97.1 - #1186
Conversation
| license = "MPL-2.0" | ||
| edition = "2021" | ||
| rust-version = "1.90" | ||
| rust-version = "1.93" |
There was a problem hiding this comment.
Without this we get the following at the pop_front_if call site
warning: current MSRV (Minimum Supported Rust Version) is `1.90.0` but this item is stable since `1.93.0`
| match state { | ||
| State::Run if first_boot => { | ||
| tokio::runtime::Handle::current().block_on(async { | ||
| for (_name, be) in guard.inventory.block.iter() { |
| false => ChainBuf::Readable(GuestAddr(desc.addr), desc.len), | ||
| }; | ||
|
|
||
| count += 1; |
There was a problem hiding this comment.
this seems wrong, or at least an existing bug, where count == self.size() isn't considered past this point?
There was a problem hiding this comment.
should we fix it here or in a PR stacked on top of this?
| } | ||
| (ty, subtype) => { | ||
| bail!( | ||
| "Device path type/subtype unsupported: ({ty:#02x}/{subtype:#02x})" |
There was a problem hiding this comment.
i'm surprised by this one, does :#02x not format as 0x and "ty" as two hex digits padded with 0?
There was a problem hiding this comment.
I was actually curious about this one as well, because the output was not what I expected.
This is a rust 1.97 lint I believe and didn't trigger on macOS with 1.96
sherma scratch
❯ cat src/main.rs
fn main() {
let ty = 4u8;
println!("{:#x}", ty);
println!("{:#0x}", ty);
println!("{:#02x}", ty);
println!("{:#04x}", ty);
}
sherma scratch
❯ cargo clippy
Checking scratch v0.1.0 (/Users/link/src/scratch)
warning: format width has no effect on the output for this format trait
--> src/main.rs:5:15
|
5 | println!("{:#02x}", ty);
| ^^^^^^^
|
= help: consider removing the width or increasing it to at least 4
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#unused_format_specs
= note: `#[warn(clippy::unused_format_specs)]` on by default
warning: `scratch` (bin "scratch") generated 1 warning
Finished [`dev` profile [unoptimized + debuginfo]](https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles) target(s) in 0.04s
sherma scratch
❯ cargo r
Finished [`dev` profile [unoptimized + debuginfo]](https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles) target(s) in 0.03s
Running `target/debug/scratch`
0x4
0x4
0x4
0x04
There was a problem hiding this comment.
So, this preserves the old behavior but we could change it if you want.
There was a problem hiding this comment.
oh i've written so many buggy format statements then. lmao. either way you want to take this here is fine imo.
Bump rust-toolchain.toml to Rust version 1.97.1, and bump the MSRV to 1.93 so that we can drop the
VecDequeExttrait which shamelessly copied thepop_front_ifmethod from the rust standard library.