Skip to content

Commit

Permalink
Fix std feature gating
Browse files Browse the repository at this point in the history
  • Loading branch information
tcharding committed Jan 10, 2024
1 parent 4122df0 commit 1459596
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ required-features = ["std"]

[[example]]
name = "v2-separate-creator-constructor"
required-features = ["std"]
2 changes: 2 additions & 0 deletions src/v2/map/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,13 +839,15 @@ 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;
OutPoint { txid, vout }
}

#[test]
#[cfg(feature = "std")]
fn serialize_roundtrip() {
let input = Input::new(out_point());

Expand Down
1 change: 1 addition & 0 deletions src/v2/map/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ impl From<serialize::Error> for InsertPairError {
}

#[cfg(test)]
#[cfg(feature = "std")]
mod tests {
use super::*;

Expand Down

0 comments on commit 1459596

Please sign in to comment.