File tree Expand file tree Collapse file tree 4 files changed +4
-21
lines changed
Expand file tree Collapse file tree 4 files changed +4
-21
lines changed Original file line number Diff line number Diff line change 9696 cargo generate-lockfile -Z minimal-versions
9797 - name : Test rand_core
9898 run : |
99- cargo test --target ${{ matrix.target }} --no-default-features
100- cargo test --target ${{ matrix.target }} --features serde
99+ cargo test --target ${{ matrix.target }}
101100
102101 test-cross :
103102 runs-on : ${{ matrix.os }}
@@ -137,11 +136,9 @@ jobs:
137136 rustup toolchain install nightly --component miri
138137 rustup override set nightly
139138 cargo miri setup
140- - name : Test rand
139+ - name : Test (miri)
141140 run : |
142141 cargo miri test
143- cargo miri test --features=serde
144- cargo miri test --no-default-features
145142
146143 test-no-std :
147144 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313- Remove feature ` os_rng ` , structs ` OsRng ` and ` OsError ` and fns ` from_os_rng ` , ` try_from_os_rng ` ([ rand #1674 ] )
1414- Remove feature ` std ` ([ rand #1674 ] )
1515- Removed dependency ` getrandom ` ([ rand #1674 ] )
16+ - Removed optional dependency ` serde ` ([ #28 ] )
1617- Add ` SeedableRng::fork ` methods ([ #17 ] )
1718### Other
1819- Changed repository from [ rust-random/rand] to [ rust-random/core] .
@@ -25,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2526[ rand#1669 ] : https://github.com/rust-random/rand/pull/1669
2627[ rand#1674 ] : https://github.com/rust-random/rand/pull/1674
2728[ #17 ] : https://github.com/rust-random/rand-core/pull/17
29+ [ #28 ] : https://github.com/rust-random/rand-core/pull/28
2830
2931[ rust-random/rand ] : https://github.com/rust-random/rand
3032[ rust-random/core ] : https://github.com/rust-random/core
Original file line number Diff line number Diff line change @@ -24,9 +24,3 @@ rustdoc-args = ["--generate-link-to-definition"]
2424
2525[package .metadata .playground ]
2626all-features = true
27-
28- [features ]
29- serde = [" dep:serde" ] # enables serde for BlockRng wrapper
30-
31- [dependencies ]
32- serde = { version = " 1.0.103" , features = [" derive" ], optional = true }
Original file line number Diff line number Diff line change 4848use crate :: le:: fill_via_chunks;
4949use crate :: { CryptoRng , RngCore , SeedableRng , TryRngCore } ;
5050use core:: fmt;
51- #[ cfg( feature = "serde" ) ]
52- use serde:: { Deserialize , Serialize } ;
5351
5452/// A trait for RNGs which do not generate random numbers individually, but in
5553/// blocks (typically `[u32; N]`). This technique is commonly used by
@@ -108,13 +106,6 @@ pub trait CryptoBlockRng: BlockRngCore {}
108106/// [`next_u64`]: RngCore::next_u64
109107/// [`fill_bytes`]: RngCore::fill_bytes
110108#[ derive( Clone ) ]
111- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
112- #[ cfg_attr(
113- feature = "serde" ,
114- serde(
115- bound = "for<'x> R: Serialize + Deserialize<'x>, for<'x> R::Results: Serialize + Deserialize<'x>"
116- )
117- ) ]
118109pub struct BlockRng < R : BlockRngCore > {
119110 results : R :: Results ,
120111 index : usize ,
@@ -273,7 +264,6 @@ impl<R: CryptoBlockRng + BlockRngCore<Item = u32>> CryptoRng for BlockRng<R> {}
273264/// [`next_u64`]: RngCore::next_u64
274265/// [`fill_bytes`]: RngCore::fill_bytes
275266#[ derive( Clone ) ]
276- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
277267pub struct BlockRng64 < R : BlockRngCore + ?Sized > {
278268 results : R :: Results ,
279269 index : usize ,
You can’t perform that action at this time.
0 commit comments