From b2dc444dd209f25f64255a102e9a455ad0edf53d Mon Sep 17 00:00:00 2001 From: yuyi Date: Fri, 23 Apr 2021 22:21:16 +0800 Subject: [PATCH] ast: minor cleanup in generic_struct_insts_to_concrete() (#9855) --- vlib/v/ast/table.v | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlib/v/ast/table.v b/vlib/v/ast/table.v index 78fc2e9e54..e0fd2402ba 100644 --- a/vlib/v/ast/table.v +++ b/vlib/v/ast/table.v @@ -1055,8 +1055,7 @@ pub fn (mut t Table) resolve_generic_to_concrete(generic_type Type, generic_name // generic struct instantiations to concrete types pub fn (mut t Table) generic_struct_insts_to_concrete() { - for idx, _ in t.type_symbols { - mut typ := unsafe { &t.type_symbols[idx] } + for mut typ in t.type_symbols { if typ.kind == .generic_struct_inst { info := typ.info as GenericStructInst parent := t.type_symbols[info.parent_idx]