mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
* build: move to the Rust 2021 edition Since the MSRV of `naga` [is currently 1.56][msrv], I don't think there's a strong reason to stay with the 2018 edition, and there _are_ a [few good reasons][edition-guide] to move to the 2021 edition. I did this migration mostly automatically, per [official Rust guidelines]: ```sh $ cargo fix --edition --all-targets $ sed -i Cargo.toml 's/2018/2021' $ cargo fix --edition-idioms --allow-dirty # doesn't change anything ``` The only manual edit needed to stymie a new warning introduced was the removal of the `TryFrom` import in several modules, since it's now in the 2021 prelude. [msrv]: https://github.com/gfx-rs/naga/blob/a7193d652e49180661a6ca047889e0685667acdb/.github/workflows/pipeline.yml#L14 [edition-guide]: https://doc.rust-lang.org/edition-guide/rust-2021/index.html [official Rust guidelines]: https://doc.rust-lang.org/cargo/commands/cargo-fix.html#edition-migration * refactor(wgsl-in): use `pat` instead of `pat_param` again How we were using `pat` in the Rust 2018 edition is actually the use case that Rust 2021's `pat` fragment specifier is intended to satisfy. So, let's just use that!