From 10bf66b9088adef7bdf170762389e0f7087b2ea4 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Thu, 16 May 2024 07:25:37 -0500 Subject: [PATCH] Add missing MSRV workflows for newer lib crates (#3042) --- ...s-bindgen.yml => msrv-windows-bindgen.yml} | 0 .github/workflows/msrv-windows-core.yml | 29 +++++++++++++++++++ ...metadata.yml => msrv-windows-metadata.yml} | 0 .github/workflows/msrv-windows-registry.yml | 29 +++++++++++++++++++ .github/workflows/msrv-windows-result.yml | 29 +++++++++++++++++++ .../{windows-sys.yml => msrv-windows-sys.yml} | 0 ...s-version.yml => msrv-windows-version.yml} | 0 .../{windows.yml => msrv-windows.yml} | 0 crates/libs/registry/src/key.rs | 3 +- 9 files changed, 88 insertions(+), 2 deletions(-) rename .github/workflows/{windows-bindgen.yml => msrv-windows-bindgen.yml} (100%) create mode 100644 .github/workflows/msrv-windows-core.yml rename .github/workflows/{windows-metadata.yml => msrv-windows-metadata.yml} (100%) create mode 100644 .github/workflows/msrv-windows-registry.yml create mode 100644 .github/workflows/msrv-windows-result.yml rename .github/workflows/{windows-sys.yml => msrv-windows-sys.yml} (100%) rename .github/workflows/{windows-version.yml => msrv-windows-version.yml} (100%) rename .github/workflows/{windows.yml => msrv-windows.yml} (100%) diff --git a/.github/workflows/windows-bindgen.yml b/.github/workflows/msrv-windows-bindgen.yml similarity index 100% rename from .github/workflows/windows-bindgen.yml rename to .github/workflows/msrv-windows-bindgen.yml diff --git a/.github/workflows/msrv-windows-core.yml b/.github/workflows/msrv-windows-core.yml new file mode 100644 index 0000000000..b124af5e4a --- /dev/null +++ b/.github/workflows/msrv-windows-core.yml @@ -0,0 +1,29 @@ +name: windows-core + +on: + pull_request: + push: + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + branches: + - master + +env: + RUSTFLAGS: -Dwarnings + +jobs: + check: + strategy: + matrix: + rust: [1.70.0, stable, nightly] + runs-on: + - windows-latest + - ubuntu-latest + runs-on: ${{ matrix.runs-on }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Prepare + run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} + - name: Check + run: cargo check -p windows-core --all-features diff --git a/.github/workflows/windows-metadata.yml b/.github/workflows/msrv-windows-metadata.yml similarity index 100% rename from .github/workflows/windows-metadata.yml rename to .github/workflows/msrv-windows-metadata.yml diff --git a/.github/workflows/msrv-windows-registry.yml b/.github/workflows/msrv-windows-registry.yml new file mode 100644 index 0000000000..a789efcdeb --- /dev/null +++ b/.github/workflows/msrv-windows-registry.yml @@ -0,0 +1,29 @@ +name: windows-registry + +on: + pull_request: + push: + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + branches: + - master + +env: + RUSTFLAGS: -Dwarnings + +jobs: + check: + strategy: + matrix: + rust: [1.60.0, stable, nightly] + runs-on: + - windows-latest + - ubuntu-latest + runs-on: ${{ matrix.runs-on }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Prepare + run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} + - name: Check + run: cargo check -p windows-registry --all-features diff --git a/.github/workflows/msrv-windows-result.yml b/.github/workflows/msrv-windows-result.yml new file mode 100644 index 0000000000..9e1067cb18 --- /dev/null +++ b/.github/workflows/msrv-windows-result.yml @@ -0,0 +1,29 @@ +name: windows-result + +on: + pull_request: + push: + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + branches: + - master + +env: + RUSTFLAGS: -Dwarnings + +jobs: + check: + strategy: + matrix: + rust: [1.60.0, stable, nightly] + runs-on: + - windows-latest + - ubuntu-latest + runs-on: ${{ matrix.runs-on }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Prepare + run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} + - name: Check + run: cargo check -p windows-result --all-features diff --git a/.github/workflows/windows-sys.yml b/.github/workflows/msrv-windows-sys.yml similarity index 100% rename from .github/workflows/windows-sys.yml rename to .github/workflows/msrv-windows-sys.yml diff --git a/.github/workflows/windows-version.yml b/.github/workflows/msrv-windows-version.yml similarity index 100% rename from .github/workflows/windows-version.yml rename to .github/workflows/msrv-windows-version.yml diff --git a/.github/workflows/windows.yml b/.github/workflows/msrv-windows.yml similarity index 100% rename from .github/workflows/windows.yml rename to .github/workflows/msrv-windows.yml diff --git a/crates/libs/registry/src/key.rs b/crates/libs/registry/src/key.rs index 2701288846..d1988220ca 100644 --- a/crates/libs/registry/src/key.rs +++ b/crates/libs/registry/src/key.rs @@ -275,8 +275,7 @@ impl Key { ptr: *const u8, len: usize, ) -> Result<()> { - let result = - unsafe { RegSetValueExW(self.0, pcwstr(name).as_ptr(), 0, ty, ptr, len.try_into()?) }; + let result = RegSetValueExW(self.0, pcwstr(name).as_ptr(), 0, ty, ptr, len.try_into()?); win32_error(result) }