Skip to content

Commit a89ff6e

Browse files
committed
fix a couple feature gates
New versions of rustc detect invalid feature gates. We had two, which resulted in tests that were never run.
1 parent 487f31b commit a89ff6e

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/blech32/decode.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,13 +889,12 @@ mod tests {
889889
}
890890

891891
#[test]
892-
#[cfg(feature = "alloc")]
893892
fn check_hrp_max_length() {
894893
let hrps =
895894
"an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio";
896895

897896
let hrp = Hrp::parse_unchecked(hrps);
898-
let s = crate::encode::<Blech32>(hrp, &[]).expect("failed to encode empty buffer");
897+
let s = crate::bech32::encode::<Blech32>(hrp, &[]).expect("failed to encode empty buffer");
899898

900899
let unchecked = UncheckedHrpstring::new(&s).expect("failed to parse address");
901900
assert_eq!(unchecked.hrp(), hrp);

src/block.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,15 +434,15 @@ mod tests {
434434
000000000000000000000000000000000000\
435435
";
436436

437-
#[cfg(feature = "serde-feature")]
437+
#[cfg(feature = "serde")]
438438
#[test]
439439
fn blockheader_serde() {
440440
let block: Block = hex_deserialize!(&SIMPLE_BLOCK);
441441
roundtrip_header(&block.header);
442442
let block: Block = hex_deserialize!(&DYNAFED_BLOCK);
443443
roundtrip_header(&block.header);
444444
}
445-
#[cfg(feature = "serde-feature")]
445+
#[cfg(feature = "serde")]
446446
fn roundtrip_header(header: &BlockHeader) {
447447
let header_ser = serde_json::to_string(header).unwrap();
448448
let header_deser: BlockHeader = serde_json::from_str(&header_ser).unwrap();

0 commit comments

Comments
 (0)