vrepl: minor optimization (#5633)
parent
3c432f5e07
commit
31104d73b9
|
@ -242,9 +242,7 @@ fn run_repl(workdir string, vrepl_prefix string) {
|
||||||
r.temp_lines.delete(0)
|
r.temp_lines.delete(0)
|
||||||
}
|
}
|
||||||
if r.line.starts_with('import ') || r.line.starts_with('#include ') {
|
if r.line.starts_with('import ') || r.line.starts_with('#include ') {
|
||||||
mut imports := r.imports
|
r.imports << r.line
|
||||||
r.imports = [r.line]
|
|
||||||
r.imports << imports
|
|
||||||
} else {
|
} else {
|
||||||
r.lines << r.line
|
r.lines << r.line
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue