Skip to content

Commit 9569873

Browse files
Fix multiline inputs
1 parent 3f20319 commit 9569873

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/repl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ fn main() {
3535
}
3636
Err(Error::IncompleteStatement(_)) => {
3737
// continue reading input and append it to `line`
38+
line.push_str("\n"); // separate input lines
3839
prompt = ">> ";
3940
}
4041
Err(e) => {

0 commit comments

Comments
 (0)