Skip to content

Commit 548e198

Browse files
authored
fix: revert MSRV & toolchain to Rust 1.90 (#859)
* Revert MSRV to 1.90 * Run cargo-msrv on 1.91 in CI
1 parent 8c3592d commit 548e198

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

.github/actions/workspace-release/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ runs:
3232
3333
- name: Install Rust toolchain
3434
uses: dtolnay/rust-toolchain@stable
35+
with:
36+
toolchain: "1.90"
3537

3638
- name: Cache cargo registry and git index
3739
uses: actions/cache@v4
@@ -55,8 +57,14 @@ runs:
5557
shell: bash
5658
run: cargo binstall --no-confirm --force cargo-msrv
5759

60+
- name: Install Rust 1.91 for cargo-msrv
61+
shell: bash
62+
run: rustup toolchain install 1.91
63+
5864
- name: Check MSRV
5965
shell: bash
66+
env:
67+
RUSTUP_TOOLCHAIN: "1.91"
6068
run: |
6169
export PATH="$HOME/.cargo/bin:$PATH"
6270
./scripts/check-msrv.sh

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edition = "2024"
1010
keywords = ["crypto", "hash", "merkle", "miden"]
1111
license = "MIT OR Apache-2.0"
1212
repository = "https://github.com/0xMiden/crypto"
13-
rust-version = "1.93"
13+
rust-version = "1.90"
1414
version = "0.23.0"
1515

1616
[workspace.dependencies]

miden-crypto/src/utils/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use alloc::{boxed::Box, string::String, vec::Vec};
44
use core::{
55
fmt::{self, Write},
6-
mem::MaybeUninit,
6+
mem::{ManuallyDrop, MaybeUninit},
77
};
88

99
// Re-export serialization traits from miden-serde-utils
@@ -237,7 +237,10 @@ pub fn uninit_vector<T>(length: usize) -> Vec<MaybeUninit<T>> {
237237
/// # Safety
238238
/// All elements must be initialized before calling this function.
239239
pub unsafe fn assume_init_vec<T>(v: Vec<MaybeUninit<T>>) -> Vec<T> {
240-
let (ptr, len, cap) = v.into_raw_parts();
240+
let mut v = ManuallyDrop::new(v);
241+
let ptr = v.as_mut_ptr();
242+
let len = v.len();
243+
let cap = v.capacity();
241244
// SAFETY: caller guarantees all elements are initialized.
242245
unsafe { Vec::from_raw_parts(ptr.cast::<T>(), len, cap) }
243246
}

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "1.93"
2+
channel = "1.90"
33
components = ["clippy", "rust-src", "rustfmt"]
44
profile = "minimal"
55
targets = ["wasm32-unknown-unknown", "wasm32-wasip2"]

0 commit comments

Comments
 (0)