aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/xml/read.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/xml/read.go')
-rw-r--r--src/encoding/xml/read.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/encoding/xml/read.go b/src/encoding/xml/read.go
index 937432e3a7..53c15a2840 100644
--- a/src/encoding/xml/read.go
+++ b/src/encoding/xml/read.go
@@ -232,7 +232,6 @@ func (p *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error {
}
val = val.Elem()
}
-
if val.CanInterface() && val.Type().Implements(unmarshalerAttrType) {
// This is an unmarshaler with a non-pointer receiver,
// so it's likely to be incorrect, but we do what we're told.
@@ -257,9 +256,7 @@ func (p *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error {
return pv.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value))
}
}
-
- copyValue(val, []byte(attr.Value))
- return nil
+ return copyValue(val, []byte(attr.Value))
}
var (