Skip to content

Commit 1585a22

Browse files
committed
🚨
1 parent 8b34d9c commit 1585a22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub enum GlobError {
118118
pub fn glob_from_vec(from: &[String], postfix: Option<&str>) -> miette::Result<Any<'static>> {
119119
from
120120
.iter()
121-
.map(|g| if let Some(postfix) = postfix { format!("{g}{postfix}") } else { g.to_string() })
121+
.map(|g| postfix.map_or_else(|| g.to_string(), |postfix| format!("{g}{postfix}")))
122122
.map(|g| Glob::new(&g).map(Glob::into_owned).map_err(|e| GlobError::Build(BuildError::into_owned(e))))
123123
.collect_vec()
124124
.pipe(join_err_result)?

0 commit comments

Comments
 (0)