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

strings: simplify Builder (#10263)

This commit is contained in:
Delyan Angelov
2021-05-31 14:21:06 +03:00
committed by GitHub
parent 8990114b4b
commit eac1e25c5d
14 changed files with 65 additions and 76 deletions

View File

@ -53,7 +53,7 @@ pub fn (mut sse SSEConnection) start() ? {
start_sb.write_string('\r\n$k: $v')
}
start_sb.write_string('\r\n')
sse.conn.write(start_sb.buf) or { return error('could not start sse response') }
sse.conn.write(start_sb) or { return error('could not start sse response') }
}
// send_message sends a single message to the http client that listens for SSE.
@ -73,5 +73,5 @@ pub fn (mut sse SSEConnection) send_message(message SSEMessage) ? {
sb.write_string('retry: $message.retry\n')
}
sb.write_string('\n')
sse.conn.write(sb.buf) ?
sse.conn.write(sb) ?
}