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

vlib: fix missing else{} in match statements

This commit is contained in:
Alexander Medvednikov
2019-12-07 17:13:25 +03:00
parent 2fb7fba856
commit ad6adf327e
15 changed files with 88 additions and 85 deletions

View File

@ -39,7 +39,7 @@ pub fn (w mut Writer) write(record []string) ?bool {
}
w.sb.write('"')
for field.len > 0 {
mut i := field.index_any('"\r\n')
if i < 0 {
@ -52,12 +52,13 @@ pub fn (w mut Writer) write(record []string) ?bool {
if field.len > 0 {
z := field[0]
match z {
`"` {
w.sb.write('""')
}
`\r`, `\n` {
w.sb.write(le)
}
`"` {
w.sb.write('""')
}
`\r`, `\n` {
w.sb.write(le)
}
else {}
}
field = field[1..]
}