Skip to content

Commit 15b4b81

Browse files
authored
Fix CI issues (#3)
Signed-off-by: John Nunley <[email protected]>
1 parent 9ba194c commit 15b4b81

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ jobs:
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')
@@ -78,7 +75,7 @@ jobs:
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

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[package]
22
name = "fastrand-contrib"
33
version = "0.1.0"
4-
edition = "2021"
4+
edition = "2018"
5+
rust-version = "1.43.1"
56

67
[dependencies]
78
fastrand = { version = "2.0.0", default-features = false }

src/float_range.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ enum Inclusive {
106106
impl 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
}

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! [`fastrand`]: https://crates.io/crates/fastrand
44
5+
#![cfg_attr(not(feature = "std"), no_std)]
6+
57
mod float_range;
68

79
use core::ops::RangeBounds;

0 commit comments

Comments
 (0)