Skip to content

Commit 90ba692

Browse files
committed
Use unwrap_or_else instead of unwrap_or
Clippy emits: warning: use of `unwrap_or` followed by a function call As suggested use `unwrap_or_else`.
1 parent da6e068 commit 90ba692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/miniscript/types/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ pub trait Property: Sized {
528528
});
529529

530530
res.map_err(|kind| Error {
531-
fragment: last_err_frag.unwrap_or(fragment.clone()),
531+
fragment: last_err_frag.unwrap_or_else(|| fragment.clone()),
532532
error: kind,
533533
})
534534
}

0 commit comments

Comments
 (0)