diff --git a/Cargo.toml b/Cargo.toml index d0d0845..fa65041 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,3 +55,4 @@ required-features = ["std"] [[example]] name = "v2-separate-creator-constructor" +required-features = ["std"] diff --git a/src/v2/map/input.rs b/src/v2/map/input.rs index 0a7cc74..05c7e6c 100644 --- a/src/v2/map/input.rs +++ b/src/v2/map/input.rs @@ -839,6 +839,7 @@ mod test { // assert_eq!(back.taproot_hash_ty(), Err(InvalidSighashTypeError(nonstd))); } + #[cfg(feature = "std")] fn out_point() -> OutPoint { let txid = Txid::hash(b"some arbitrary bytes"); let vout = 0xab; @@ -846,6 +847,7 @@ mod test { } #[test] + #[cfg(feature = "std")] fn serialize_roundtrip() { let input = Input::new(out_point()); diff --git a/src/v2/map/output.rs b/src/v2/map/output.rs index d15c16d..b15423f 100644 --- a/src/v2/map/output.rs +++ b/src/v2/map/output.rs @@ -346,6 +346,7 @@ impl From for InsertPairError { } #[cfg(test)] +#[cfg(feature = "std")] mod tests { use super::*;