refactor: change FileReference.DecodeMsgpack to just directly decode history, as it has its own deser
This commit is contained in:
parent
0e2ef0969a
commit
15b6a0dc19
|
@ -120,19 +120,7 @@ func (fr *FileReference) DecodeMsgpack(dec *msgpack.Decoder) error {
|
|||
|
||||
hasExt = true
|
||||
case int8(8):
|
||||
historyDataLen, err := dec.DecodeMapLen()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fr.History = make(map[int]*FileVersion, historyDataLen)
|
||||
for range fr.History {
|
||||
k, err := dec.DecodeInt()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var fileVersion FileVersion
|
||||
err = dec.Decode(&fileVersion)
|
||||
err := dec.Decode(&fr.History)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue