@@ -64,37 +64,40 @@ pub struct Miniscript<Pk: MiniscriptKey, Ctx: ScriptContext> {
64
64
}
65
65
66
66
/// `PartialOrd` of `Miniscript` must depend only on node and not the type information.
67
- /// The type information and extra_properties can be deterministically determined
68
- /// by the ast .
67
+ ///
68
+ /// The type information and extra properties are implied by the AST .
69
69
impl < Pk : MiniscriptKey , Ctx : ScriptContext > PartialOrd for Miniscript < Pk , Ctx > {
70
70
fn partial_cmp ( & self , other : & Miniscript < Pk , Ctx > ) -> Option < cmp:: Ordering > {
71
71
Some ( self . node . cmp ( & other. node ) )
72
72
}
73
73
}
74
74
75
75
/// `Ord` of `Miniscript` must depend only on node and not the type information.
76
- /// The type information and extra_properties can be deterministically determined
77
- /// by the ast .
76
+ ///
77
+ /// The type information and extra properties are implied by the AST .
78
78
impl < Pk : MiniscriptKey , Ctx : ScriptContext > Ord for Miniscript < Pk , Ctx > {
79
79
fn cmp ( & self , other : & Miniscript < Pk , Ctx > ) -> cmp:: Ordering {
80
80
self . node . cmp ( & other. node )
81
81
}
82
82
}
83
83
84
84
/// `PartialEq` of `Miniscript` must depend only on node and not the type information.
85
- /// The type information and extra_properties can be deterministically determined
86
- /// by the ast .
85
+ ///
86
+ /// The type information and extra properties are implied by the AST .
87
87
impl < Pk : MiniscriptKey , Ctx : ScriptContext > PartialEq for Miniscript < Pk , Ctx > {
88
88
fn eq ( & self , other : & Miniscript < Pk , Ctx > ) -> bool {
89
89
self . node . eq ( & other. node )
90
90
}
91
91
}
92
92
93
93
/// `Eq` of `Miniscript` must depend only on node and not the type information.
94
- /// The type information and extra_properties can be deterministically determined
95
- /// by the ast .
94
+ ///
95
+ /// The type information and extra properties are implied by the AST .
96
96
impl < Pk : MiniscriptKey , Ctx : ScriptContext > Eq for Miniscript < Pk , Ctx > { }
97
97
98
+ /// `Hash` of `Miniscript` must depend only on node and not the type information.
99
+ ///
100
+ /// The type information and extra properties are implied by the AST.
98
101
impl < Pk : MiniscriptKey , Ctx : ScriptContext > hash:: Hash for Miniscript < Pk , Ctx > {
99
102
fn hash < H : hash:: Hasher > ( & self , state : & mut H ) {
100
103
self . node . hash ( state) ;
0 commit comments