1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

update all index() uses

This commit is contained in:
Alexander Medvednikov
2019-11-30 15:27:16 +03:00
parent 2651b8957a
commit a23a4ed98a
4 changed files with 20 additions and 18 deletions

View File

@ -187,12 +187,16 @@ fn print_output(s os.Result) {
for line in lines {
if line.starts_with('.vrepl_temp.v') {
// Hide the temporary file name
println(line[line.index(' ') + 1 .. ])
idx := line.index(' ') or {
println(line)
return
}
println(line[idx+1..])
} else {
println(line)
}
}
}
fn main() {