From 31104d73b95d8aa5f1b324911b0a94bfe87cddc4 Mon Sep 17 00:00:00 2001 From: yuyi Date: Fri, 3 Jul 2020 17:22:34 +0800 Subject: [PATCH] vrepl: minor optimization (#5633) --- cmd/tools/vrepl.v | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/tools/vrepl.v b/cmd/tools/vrepl.v index c1b3bd4450..14c5b2899a 100644 --- a/cmd/tools/vrepl.v +++ b/cmd/tools/vrepl.v @@ -242,9 +242,7 @@ fn run_repl(workdir string, vrepl_prefix string) { r.temp_lines.delete(0) } if r.line.starts_with('import ') || r.line.starts_with('#include ') { - mut imports := r.imports - r.imports = [r.line] - r.imports << imports + r.imports << r.line } else { r.lines << r.line }