Skip to content

Commit b6c3ca8

Browse files
committed
types: don't implement Property for ExtData.
Most of these functions are not called from anywhere, and the ones that are called are only called from tests. It may be worth revisiting whether they ought to be pub. For now I just left them as pub since they were publicly visible before. See earlier commit message for justification.
1 parent 87294ff commit b6c3ca8

File tree

3 files changed

+88
-73
lines changed

3 files changed

+88
-73
lines changed

src/miniscript/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ mod tests {
891891
let pk_node = Terminal::Check(Arc::new(Miniscript {
892892
node: Terminal::PkK(String::from("")),
893893
ty: Type::from_pk_k::<Segwitv0>(),
894-
ext: types::extra_props::ExtData::from_pk_k::<Segwitv0>(),
894+
ext: types::extra_props::ExtData::pk_k::<Segwitv0>(),
895895
phantom: PhantomData,
896896
}));
897897
let pkk_ms: Miniscript<String, Segwitv0> = Miniscript::from_ast(pk_node).unwrap();
@@ -900,7 +900,7 @@ mod tests {
900900
let pkh_node = Terminal::Check(Arc::new(Miniscript {
901901
node: Terminal::PkH(String::from("")),
902902
ty: Type::from_pk_h::<Segwitv0>(),
903-
ext: types::extra_props::ExtData::from_pk_h::<Segwitv0>(),
903+
ext: types::extra_props::ExtData::pk_h::<Segwitv0>(),
904904
phantom: PhantomData,
905905
}));
906906
let pkh_ms: Miniscript<String, Segwitv0> = Miniscript::from_ast(pkh_node).unwrap();
@@ -921,7 +921,7 @@ mod tests {
921921
let pkk_node = Terminal::Check(Arc::new(Miniscript {
922922
node: Terminal::PkK(pk),
923923
ty: Type::from_pk_k::<Segwitv0>(),
924-
ext: types::extra_props::ExtData::from_pk_k::<Segwitv0>(),
924+
ext: types::extra_props::ExtData::pk_k::<Segwitv0>(),
925925
phantom: PhantomData,
926926
}));
927927
let pkk_ms: Segwitv0Script = Miniscript::from_ast(pkk_node).unwrap();
@@ -936,11 +936,11 @@ mod tests {
936936
node: Terminal::Check(Arc::new(Miniscript {
937937
node: Terminal::RawPkH(hash),
938938
ty: Type::from_pk_h::<Segwitv0>(),
939-
ext: types::extra_props::ExtData::from_pk_h::<Segwitv0>(),
939+
ext: types::extra_props::ExtData::pk_h::<Segwitv0>(),
940940
phantom: PhantomData,
941941
})),
942942
ty: Type::cast_check(Type::from_pk_h::<Segwitv0>()).unwrap(),
943-
ext: ExtData::cast_check(ExtData::from_pk_h::<Segwitv0>()).unwrap(),
943+
ext: ExtData::cast_check(ExtData::pk_h::<Segwitv0>()).unwrap(),
944944
phantom: PhantomData,
945945
};
946946

0 commit comments

Comments
 (0)