From 9b76f2169e2ad4976932ad4e201f2c7fc58fe09e Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Sat, 4 May 2024 12:25:46 -0700 Subject: [PATCH] Use zerocopy 0.7.33, not 0.8.0-alpha --- Cargo.toml | 2 +- rand_core/Cargo.toml | 2 +- rand_core/src/impls.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 48f8719e29..8ffdff7819 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ rand_core = { path = "rand_core", version = "=0.9.0-alpha.1", default-features = log = { version = "0.4.4", optional = true } serde = { version = "1.0.103", features = ["derive"], optional = true } rand_chacha = { path = "rand_chacha", version = "=0.9.0-alpha.1", default-features = false, optional = true } -zerocopy = { version = "=0.8.0-alpha.6", default-features = false, features = ["simd"] } +zerocopy = { version = "0.7.33", default-features = false, features = ["simd"] } [dev-dependencies] rand_pcg = { path = "rand_pcg", version = "=0.9.0-alpha.1" } diff --git a/rand_core/Cargo.toml b/rand_core/Cargo.toml index 642e9a12ad..7c4118f632 100644 --- a/rand_core/Cargo.toml +++ b/rand_core/Cargo.toml @@ -32,4 +32,4 @@ serde1 = ["serde"] # enables serde for BlockRng wrapper [dependencies] serde = { version = "1", features = ["derive"], optional = true } getrandom = { version = "0.2", optional = true } -zerocopy = { version = "=0.8.0-alpha.6", default-features = false } +zerocopy = { version = "0.7.33", default-features = false } diff --git a/rand_core/src/impls.rs b/rand_core/src/impls.rs index a8fc1a7e8c..d7dcd3457d 100644 --- a/rand_core/src/impls.rs +++ b/rand_core/src/impls.rs @@ -19,7 +19,7 @@ use crate::RngCore; use core::cmp::min; -use zerocopy::{IntoBytes, NoCell}; +use zerocopy::AsBytes; /// Implement `next_u64` via `next_u32`, little-endian order. pub fn next_u64_via_u32(rng: &mut R) -> u64 { @@ -53,7 +53,7 @@ pub fn fill_bytes_via_next(rng: &mut R, dest: &mut [u8]) { } } -trait Observable: IntoBytes + NoCell + Copy { +trait Observable: AsBytes + Copy { fn to_le(self) -> Self; } impl Observable for u32 {