Skip to content

Commit 9e78677

Browse files
committed
address PR feedback
1 parent 239b89d commit 9e78677

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

sio/csvio/reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func convertString(s string) any {
120120

121121
func validate(strings []string) bool {
122122
for _, s := range strings {
123-
if !utf8.Valid([]byte(s)) {
123+
if !utf8.ValidString(s) {
124124
return false
125125
}
126126
}

sup/marshal.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -732,16 +732,11 @@ func (u *UnmarshalBSUPContext) decodeAny(val super.Value, v reflect.Value) (x er
732732
if !ok || fusionType.Type != super.TypeAll {
733733
return errors.New("super value is not type fusion(all)")
734734
}
735-
it := val.Bytes().Iter()
736-
bytes := it.Next()
737735
//XXX
738736
if u.sctx == nil {
739737
u.sctx = super.NewContext()
740738
}
741-
typ, err := u.sctx.LookupByValue(it.Next())
742-
if err != nil {
743-
return err
744-
}
739+
bytes, typ := fusionType.Deref(u.sctx, val.Bytes())
745740
val := super.NewValue(typ, bytes)
746741
v.Set(reflect.ValueOf(val.Copy()))
747742
return nil

0 commit comments

Comments
 (0)