checker/table: minor cleanup by removing unnecessary `_` variable (#8801)

pull/8819/head
zakuro 2021-02-18 18:30:43 +09:00 committed by GitHub
parent 198b395cde
commit a34a1ab864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -127,7 +127,7 @@ pub fn (mut c Checker) check_scope_vars(sc &ast.Scope) {
else {}
}
}
for _, child in sc.children {
for child in sc.children {
c.check_scope_vars(child)
}
}
@ -5506,7 +5506,7 @@ fn (c Checker) check_struct_signature(from table.Struct, to table.Struct) bool {
if from.fields.len == 0 {
return false
}
for _, field in from.fields {
for field in from.fields {
filtered := to.fields.filter(it.name == field.name)
if filtered.len != 1 {
// field doesn't exist

View File

@ -773,7 +773,7 @@ pub fn (mytable &Table) known_type_names() []string {
// it doesn't care about childs that are references
pub fn (mytable &Table) has_deep_child_no_ref(ts &TypeSymbol, name string) bool {
if ts.info is Struct {
for _, field in ts.info.fields {
for field in ts.info.fields {
sym := mytable.get_type_symbol(field.typ)
if !field.typ.is_ptr() && (sym.name == name || mytable.has_deep_child_no_ref(sym, name)) {
return true