vrepl: minor cleanup in current_source_code() (#21863)

This commit is contained in:
yuyi 2024-07-13 22:32:10 +08:00 committed by GitHub
parent 510500d21b
commit 5c2d64a235
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -183,8 +183,7 @@ fn (r &Repl) import_to_source_code() []string {
} }
fn (r &Repl) current_source_code(should_add_temp_lines bool, not_add_print bool) string { fn (r &Repl) current_source_code(should_add_temp_lines bool, not_add_print bool) string {
mut all_lines := []string{} mut all_lines := r.import_to_source_code()
all_lines.insert(0, r.import_to_source_code())
if vstartup != '' { if vstartup != '' {
mut lines := []string{} mut lines := []string{}