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

require ++ instead of += 1

This commit is contained in:
Alexander Medvednikov
2019-12-08 14:11:19 +03:00
parent 8bc94947e5
commit cc682eafe1
4 changed files with 11 additions and 8 deletions

View File

@@ -19,14 +19,14 @@ pub fn new_builder(initial_size int) Builder {
pub fn (b mut Builder) write_b(data byte) {
b.buf << data
b.len += 1
b.len++
}
pub fn (b mut Builder) write(s string) {
b.buf.push_many(s.str, s.len)
//for c in s {
//b.buf << c
//}
//}
//b.buf << []byte(s) // TODO
b.len += s.len
}
@@ -34,7 +34,7 @@ pub fn (b mut Builder) write(s string) {
pub fn (b mut Builder) writeln(s string) {
//for c in s {
//b.buf << c
//}
//}
b.buf.push_many(s.str, s.len)
//b.buf << []byte(s) // TODO
b.buf << `\n`