From 5ff482dec021d1059f6c38ecf9e328a959f49452 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Tue, 1 Apr 2014 12:10:58 -0700 Subject: [PATCH] consul: FSM snapshot can avoid type assertion --- consul/fsm.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/consul/fsm.go b/consul/fsm.go index 5e8c980e2c..22854729fd 100644 --- a/consul/fsm.go +++ b/consul/fsm.go @@ -305,10 +305,8 @@ OUTER: if raw == nil { break OUTER } - ent := raw.(*structs.DirEntry) - sink.Write([]byte{byte(structs.KVSRequestType)}) - if err := encoder.Encode(ent); err != nil { + if err := encoder.Encode(raw); err != nil { sink.Cancel() return err }