consul: FSM snapshot can avoid type assertion

pull/17/head
Armon Dadgar 11 years ago
parent 9473bbe7bf
commit 5ff482dec0

@ -305,10 +305,8 @@ OUTER:
if raw == nil { if raw == nil {
break OUTER break OUTER
} }
ent := raw.(*structs.DirEntry)
sink.Write([]byte{byte(structs.KVSRequestType)}) sink.Write([]byte{byte(structs.KVSRequestType)})
if err := encoder.Encode(ent); err != nil { if err := encoder.Encode(raw); err != nil {
sink.Cancel() sink.Cancel()
return err return err
} }

Loading…
Cancel
Save