examples: minor optimization of calculator (#6367)

pull/6399/head
Ruofan XU 2020-09-17 07:14:26 +08:00 committed by GitHub
parent a984f9cf97
commit 11f10fdce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -117,8 +117,7 @@ fn main() {
mut expr_count := 0
for {
expr_count++
print('[$expr_count] ')
expr := os.get_line().trim_space()
expr := os.input('[$expr_count] ').trim_space()
if expr in ['exit', 'EXIT'] {
break
}