From 0e128a9457f761b8a90d867f6cbbe9611c7c0752 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Fri, 1 Dec 2023 13:10:04 -0700 Subject: [PATCH] p256: fix tests with `hash2curve` feature (#998) --- .github/workflows/p256.yml | 1 + p256/src/arithmetic/hash2curve.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/p256.yml b/.github/workflows/p256.yml index ee488b3b..a720c90d 100644 --- a/.github/workflows/p256.yml +++ b/.github/workflows/p256.yml @@ -80,6 +80,7 @@ jobs: - run: cargo check --target ${{ matrix.target }} --all-features - run: cargo test --release --target ${{ matrix.target }} --no-default-features - run: cargo test --release --target ${{ matrix.target }} + - run: cargo test --release --target ${{ matrix.target }} --features hash2curve - run: cargo test --release --target ${{ matrix.target }} --all-features cross: diff --git a/p256/src/arithmetic/hash2curve.rs b/p256/src/arithmetic/hash2curve.rs index dab2848b..b1520e9f 100644 --- a/p256/src/arithmetic/hash2curve.rs +++ b/p256/src/arithmetic/hash2curve.rs @@ -93,7 +93,8 @@ impl FromOkm for Scalar { #[cfg(test)] mod tests { - use crate::{arithmetic::field::MODULUS, FieldElement, NistP256, Scalar, U256}; + use super::FieldElement; + use crate::{arithmetic::field::MODULUS, NistP256, Scalar, U256}; use elliptic_curve::{ bigint::{ArrayEncoding, CheckedSub, NonZero, U384}, consts::U48,