summaryrefslogtreecommitdiff
path: root/src/pkg/reflect/type.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-03-30 10:51:11 -0700
committerRuss Cox <rsc@golang.org>2010-03-30 10:51:11 -0700
commita4d61cffa679cee2c85de18f115d754727a127cd (patch)
tree8b338a7affb56cf4142d66f8a8cd691366fdf7d1 /src/pkg/reflect/type.go
parent68643f292414be8ca1b95a2f6e85e1fb64876cf3 (diff)
downloadgolang-a4d61cffa679cee2c85de18f115d754727a127cd.tar.gz
simplify various code using new map index rule
R=r CC=golang-dev http://codereview.appspot.com/833044
Diffstat (limited to 'src/pkg/reflect/type.go')
-rw-r--r--src/pkg/reflect/type.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/reflect/type.go b/src/pkg/reflect/type.go
index b82f1e23e..a8df033af 100644
--- a/src/pkg/reflect/type.go
+++ b/src/pkg/reflect/type.go
@@ -510,7 +510,7 @@ const inf = 1 << 30 // infinity - no struct has that many nesting levels
func (t *StructType) fieldByName(name string, mark map[*StructType]bool, depth int) (ff StructField, fd int) {
fd = inf // field depth
- if _, marked := mark[t]; marked {
+ if mark[t] {
// Struct already seen.
return
}