diff --git a/.github/workflows/ci_test.yml b/.github/workflows/ci_test.yml index 1bbb59f..fc36130 100644 --- a/.github/workflows/ci_test.yml +++ b/.github/workflows/ci_test.yml @@ -47,6 +47,26 @@ jobs: with: command: test + wasm32_build: + name: Build on wasm32-unknown-unknown + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: wasm32-unknown-unknown + override: true + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: build + args: --target wasm32-unknown-unknown + lints: name: Lints runs-on: ubuntu-latest diff --git a/src/error.rs b/src/error.rs index 919a82c..2f774b3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -21,7 +21,7 @@ pub enum CpuFeature { impl CpuFeature { /// Test if the given CPU feature is detected. pub fn is_detected(&self) -> bool { - match self { + match *self { #[cfg(target_arch = "x86_64")] CpuFeature::Sse3 => { is_x86_feature_detected!("sse3") @@ -44,7 +44,7 @@ impl CpuFeature { impl fmt::Display for CpuFeature { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { + match *self { #[cfg(target_arch = "x86_64")] CpuFeature::Sse3 => { write!(f, "sse3")