Skip to content

Commit 2862845

Browse files
committed
Fix clippy warning
1 parent 3b03674 commit 2862845

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vm/src/stdlib/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ mod fileio {
605605
let mode = args
606606
.mode
607607
.map(|mode| mode.as_str().to_owned())
608-
.unwrap_or("r".to_owned());
608+
.unwrap_or_else(|| "r".to_owned());
609609
let (name, file_no) = match args.name {
610610
Either::A(name) => {
611611
if !args.closefd {

0 commit comments

Comments
 (0)