Skip to content

Commit 7312045

Browse files
refactor(interpreter): apply clippy suggestion
1 parent 10cd3a0 commit 7312045

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/interpreter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl Interpreter {
272272
.chars()
273273
.last()
274274
.map(|character| character.to_string())
275-
.unwrap_or(String::from("")),
275+
.unwrap_or_else(|| String::from("")),
276276
))),
277277
object => Err(format!("last() can't be used on {}", object)),
278278
}

0 commit comments

Comments
 (0)