Skip to content

Commit 54f2384

Browse files
committed
Remove redundant clone
This function consumes self so no need to clone it both times.
1 parent 230cab9 commit 54f2384

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/policy/semantic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
188188
// Witness is currently encoded as policy. Only accepts leaf fragment and
189189
// a normalized policy
190190
fn satisfy_constraint(self, witness: &Policy<Pk>, available: bool) -> Policy<Pk> {
191-
debug_assert!(self.clone().normalized() == self.clone());
191+
debug_assert!(self.clone().normalized() == self);
192192
match *witness {
193193
// only for internal purposes, safe to use unreachable!
194194
Policy::Threshold(..) => unreachable!(),

0 commit comments

Comments
 (0)