Skip to content

Commit a45d879

Browse files
committed
Change Size and LastNonIgnoreableField to uint8
1 parent 89b293f commit a45d879

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

serialization/serialization.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ func (m *Message) GetFieldByName(name string) (Field, error) {
3939

4040
// Format is describing a `message_format`
4141
type Format struct {
42-
Size uint64
43-
LastNonIgnorableField int
42+
Size uint8
43+
LastNonIgnorableField uint8
4444
Fields []Field
4545
}
4646

@@ -206,9 +206,9 @@ func Unmarshal(data []byte, v interface{}) error {
206206
}
207207
case *Format:
208208
pos := uint64(0)
209-
m.Size = uint64(data[pos] >> 1)
209+
m.Size = data[pos] >> 1
210210
pos++
211-
m.LastNonIgnorableField = int(data[pos] >> 1)
211+
m.LastNonIgnorableField = data[pos] >> 1
212212
pos++
213213

214214
for i := 0; i < len(m.Fields); i++ {

0 commit comments

Comments
 (0)