Skip to content

Commit

Permalink
cargo: Bump windows crate range to 0.53-0.59 (#258)
Browse files Browse the repository at this point in the history
* cargo: Bump `windows` crate range to `0.53-0.59`

Note that `windows 0.59` bumps the MSRV to `1.74`, but we still support
this crate dependency all the way back to `0.53`.

* CI: Use minimal dependency versions when running MSRV check

For the time being we have to instruct `cargo` to use some lower version
of our dependencies to ensure our MSRV doesn't need to be bumped -
that is one of the resons why we have a supported version range on our
dependencies.  In the future when Rust 1.84 becomes our MSRV, it will
be able to resolve these automatically (assumming crates set their
`rust-version` correctly if at all!):
https://blog.rust-lang.org/2025/01/09/Rust-1.84.0.html#cargo-considers-rust-versions-for-dependency-version-selection

* Address new clippy lints
  • Loading branch information
MarijnS95 authored Jan 24, 2025
1 parent e6dbe11 commit 5e4191d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ rustflags = [
"-Wclippy::match_wild_err_arm",
"-Wclippy::match_wildcard_for_single_variants",
"-Wclippy::mem_forget",
"-Wclippy::mismatched_target_os",
"-Wclippy::missing_enforced_import_renames",
"-Wclippy::mut_mut",
"-Wclippy::mutex_integer",
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- name: Generate lockfile with minimal dependency versions
run: cargo +nightly generate-lockfile -Zminimal-versions
- uses: dtolnay/[email protected]
# Note that examples are extempt from the MSRV check, so that they can use newer Rust features
- run: cargo check --workspace --features ${{ matrix.features }} --no-default-features
Expand Down Expand Up @@ -65,13 +68,6 @@ jobs:
- name: Cargo clippy
run: cargo clippy --workspace --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings

- name: Install nightly Rust
uses: dtolnay/rust-toolchain@nightly
- name: Generate lockfile with minimal dependency versions
run: cargo +nightly generate-lockfile -Zminimal-versions
- name: Cargo clippy with minimal-versions
run: cargo +stable clippy --workspace --features ${{ matrix.features }} --no-default-features -- -D warnings

doc:
name: Build documentation
strategy:
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ objc2-metal = { version = "0.2.1", default-features = false, features = [
winapi = { version = "0.3.9", features = ["d3d12", "winerror", "impl-default", "impl-debug"], optional = true }

[target.'cfg(windows)'.dependencies.windows]
version = ">=0.53,<=0.58"
version = ">=0.53,<=0.59"
features = [
"Win32_Graphics_Direct3D12",
"Win32_Graphics_Dxgi_Common",
Expand All @@ -68,7 +68,7 @@ winapi = { version = "0.3.9", features = ["d3d12", "d3d12sdklayers", "dxgi1_6",

[target.'cfg(windows)'.dev-dependencies.windows]
# API-breaks since Windows 0.58 only affect our examples
version = "0.58"
version = ">=0.58,<=0.59"
features = [
"Win32_Graphics_Direct3D",
"Win32_Graphics_Direct3D12",
Expand Down
2 changes: 1 addition & 1 deletion src/vulkan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ pub struct MappedAllocationSlab<'a> {
}

// SAFETY: See the safety comment of Allocation::as_mapped_slab above.
unsafe impl<'a> presser::Slab for MappedAllocationSlab<'a> {
unsafe impl presser::Slab for MappedAllocationSlab<'_> {
fn base_ptr(&self) -> *const u8 {
self.mapped_ptr
}
Expand Down

0 comments on commit 5e4191d

Please sign in to comment.