Skip to content

Commit eea3eec

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 3e12a21 commit eea3eec

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
@@ -526,7 +526,7 @@ pub trait Property: Sized {
526526
});
527527

528528
res.map_err(|kind| Error {
529-
fragment: last_err_frag.unwrap_or(fragment.clone()),
529+
fragment: last_err_frag.unwrap_or_else(|| fragment.clone()),
530530
error: kind,
531531
})
532532
}

0 commit comments

Comments
 (0)