Skip to content

Commit fd09756

Browse files
committed
Make Miniscript cmp/ord/hash docs uniform
Improve and make the docs all the same.
1 parent 1d1ac37 commit fd09756

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/miniscript/mod.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,37 +64,40 @@ pub struct Miniscript<Pk: MiniscriptKey, Ctx: ScriptContext> {
6464
}
6565

6666
/// `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.
6969
impl<Pk: MiniscriptKey, Ctx: ScriptContext> PartialOrd for Miniscript<Pk, Ctx> {
7070
fn partial_cmp(&self, other: &Miniscript<Pk, Ctx>) -> Option<cmp::Ordering> {
7171
Some(self.node.cmp(&other.node))
7272
}
7373
}
7474

7575
/// `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.
7878
impl<Pk: MiniscriptKey, Ctx: ScriptContext> Ord for Miniscript<Pk, Ctx> {
7979
fn cmp(&self, other: &Miniscript<Pk, Ctx>) -> cmp::Ordering {
8080
self.node.cmp(&other.node)
8181
}
8282
}
8383

8484
/// `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.
8787
impl<Pk: MiniscriptKey, Ctx: ScriptContext> PartialEq for Miniscript<Pk, Ctx> {
8888
fn eq(&self, other: &Miniscript<Pk, Ctx>) -> bool {
8989
self.node.eq(&other.node)
9090
}
9191
}
9292

9393
/// `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.
9696
impl<Pk: MiniscriptKey, Ctx: ScriptContext> Eq for Miniscript<Pk, Ctx> {}
9797

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.
98101
impl<Pk: MiniscriptKey, Ctx: ScriptContext> hash::Hash for Miniscript<Pk, Ctx> {
99102
fn hash<H: hash::Hasher>(&self, state: &mut H) {
100103
self.node.hash(state);

0 commit comments

Comments
 (0)