Merge pull request #664 from schungx/master

Fix no-std by limiting ahash to 0.8.0.
This commit is contained in:
Stephen Chung 2022-11-05 12:08:12 +08:00 committed by GitHub
commit 654256ecfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View File

@ -71,9 +71,8 @@ jobs:
# smoketests for different toolchains
- {toolchain: stable, os: windows-latest, experimental: false, flags: ""}
- {toolchain: stable, os: macos-latest, experimental: false, flags: ""}
# data structure size changes - wait for beta to become stable and uncomment
#- {toolchain: beta, os: ubuntu-latest, experimental: false, flags: ""}
#- {toolchain: nightly, os: ubuntu-latest, experimental: true, flags: ""}
- {toolchain: beta, os: ubuntu-latest, experimental: false, flags: ""}
- {toolchain: nightly, os: ubuntu-latest, experimental: true, flags: ""}
fail-fast: false
steps:
- name: Checkout
@ -96,8 +95,6 @@ jobs:
continue-on-error: ${{matrix.experimental}}
strategy:
matrix:
flags:
- ""
include:
- {os: ubuntu-latest, flags: "--profile unix", experimental: false}
- {os: windows-latest, flags: "--profile windows", experimental: true}

View File

@ -19,7 +19,8 @@ categories = ["no-std", "embedded", "wasm", "parser-implementations"]
[dependencies]
smallvec = { version = "1.7", default-features = false, features = ["union", "const_new", "const_generics"] }
ahash = { version = "0.8", default-features = false, features = ["compile-time-rng"] }
# 0.8.1 pulls in `getrandom/js` which breaks no-std
ahash = { version = "=0.8.0", default-features = false, features = ["compile-time-rng"] }
num-traits = { version = "0.2", default-features = false }
bitflags = { version = "1", default-features = false }
smartstring = { version = "1", default-features = false }

View File

@ -20,6 +20,7 @@
// [236,800,954,213], haha funny yume nikki reference epic uboachan face numberworld nexus moment 100
use crate::config::hashing_env;
use core::panic::{RefUnwindSafe, UnwindSafe};
#[cfg(feature = "no_std")]
use std::prelude::v1::*;
use std::{
@ -27,7 +28,6 @@ use std::{
marker::PhantomData,
mem,
mem::MaybeUninit,
panic::{RefUnwindSafe, UnwindSafe},
sync::atomic::{AtomicBool, AtomicUsize, Ordering},
};