File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 3939 # --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
4040 run : rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
4141 - run : rustup target add thumbv7m-none-eabi
42- - name : Install wasm-pack
43- uses : taiki-e/install-action@wasm-pack
4442 if : startsWith(matrix.os, 'ubuntu')
4543 - name : Run cargo check
4644 run : cargo check --all --all-features --all-targets
@@ -52,11 +50,10 @@ jobs:
5250 - name : Build with no default features
5351 # Use no-std target to ensure we don't link to std.
5452 run : cargo build --no-default-features --target thumbv7m-none-eabi
53+ if : startsWith(matrix.os, 'ubuntu')
5554 - name : Build with no default features and alloc
5655 # Use no-std target to ensure we don't link to std.
5756 run : cargo build --no-default-features --features alloc --target thumbv7m-none-eabi
58- - name : Test wasm
59- run : wasm-pack test --headless --chrome
6057 if : startsWith(matrix.os, 'ubuntu')
6158 - run : cargo bench
6259 if : startsWith(matrix.rust, 'nightly')
7875 matrix :
7976 # When updating this, the reminder to update the minimum supported
8077 # Rust version in Cargo.toml.
81- rust : ['1.36 ']
78+ rust : ['1.43.1 ']
8279 steps :
8380 - uses : actions/checkout@v3
8481 - name : Install Rust
Original file line number Diff line number Diff line change 11[package ]
22name = " fastrand-contrib"
33version = " 0.1.0"
4- edition = " 2021"
4+ edition = " 2018"
5+ rust-version = " 1.43.1"
56
67[dependencies ]
78fastrand = { version = " 2.0.0" , default-features = false }
Original file line number Diff line number Diff line change @@ -106,17 +106,17 @@ enum Inclusive {
106106impl Inclusive {
107107 fn from_bounds < T > ( range : impl RangeBounds < T > ) -> Self {
108108 match ( range. start_bound ( ) , range. end_bound ( ) ) {
109- ( Bound :: Excluded ( _) , Bound :: Excluded ( _) ) => Self :: None ,
109+ ( Bound :: Excluded ( _) , Bound :: Excluded ( _) ) => Inclusive :: None ,
110110 ( Bound :: Included ( _) , Bound :: Excluded ( _) ) | ( Bound :: Unbounded , Bound :: Excluded ( _) ) => {
111- Self :: Left
111+ Inclusive :: Left
112112 }
113113 ( Bound :: Excluded ( _) , Bound :: Included ( _) ) | ( Bound :: Excluded ( _) , Bound :: Unbounded ) => {
114- Self :: Right
114+ Inclusive :: Right
115115 }
116116 ( Bound :: Included ( _) , Bound :: Included ( _) )
117117 | ( Bound :: Included ( _) , Bound :: Unbounded )
118118 | ( Bound :: Unbounded , Bound :: Included ( _) )
119- | ( Bound :: Unbounded , Bound :: Unbounded ) => Self :: Both ,
119+ | ( Bound :: Unbounded , Bound :: Unbounded ) => Inclusive :: Both ,
120120 }
121121 }
122122}
Original file line number Diff line number Diff line change 22//!
33//! [`fastrand`]: https://crates.io/crates/fastrand
44
5+ #![ cfg_attr( not( feature = "std" ) , no_std) ]
6+
57mod float_range;
68
79use core:: ops:: RangeBounds ;
You can’t perform that action at this time.
0 commit comments