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

all: fix remaining []array warnings

This commit is contained in:
yuyi
2020-04-26 22:25:54 +08:00
committed by GitHub
parent 9f4d498ff1
commit 2574dce174
21 changed files with 34 additions and 36 deletions

View File

@ -41,7 +41,7 @@ pub fn (r Result) num_fields() int {
}
pub fn (r Result) rows() []Row {
mut rows := []Row
mut rows := []Row{}
nr_cols := r.num_fields()
for rr := r.fetch_row(); rr; rr = r.fetch_row() {
mut row := Row{}
@ -58,7 +58,7 @@ pub fn (r Result) rows() []Row {
}
pub fn (r Result) fetch_fields() []Field {
mut fields := []Field
mut fields := []Field{}
nr_cols := r.num_fields()
orig_fields := mysql_fetch_fields(r.result)
for i in 0..nr_cols {
@ -90,7 +90,7 @@ pub fn (r Result) fetch_fields() []Field {
pub fn (f Field) str() string {
return '
{
{
name: "$f.name"
org_name: "$f.org_name"
table: "$f.table"