Skip to content

Commit 75d836a

Browse files
committed
Minor refactor to interpret_line
Use `.to_owned` instead of `.to_string` The important part is that its being copied, not that its `String`
1 parent a846f52 commit 75d836a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ impl<'a> Environment<'a> {
13001300
break 'empty_input_buffer;
13011301
}
13021302

1303-
let token: String = String::from_utf8_lossy(token).to_string();
1303+
let token = core::str::from_utf8(token).unwrap().to_owned();
13041304

13051305
self.handle_token(&token);
13061306
}

0 commit comments

Comments
 (0)