From bed16416aa39c7c98fe5062f611260b3eaf50883 Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Sat, 9 Jan 2021 13:56:33 +0900 Subject: [PATCH] Remove unnecessary code --- encode_vm.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/encode_vm.go b/encode_vm.go index b5980ff..6f816b1 100644 --- a/encode_vm.go +++ b/encode_vm.go @@ -1184,12 +1184,8 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, code *opcode) ([]byte case opStructFieldHead: ptr := load(ctxptr, code.idx) if ptr == 0 { - //if code.op == opStructFieldPtrHead { b = encodeNull(b) b = encodeComma(b) - //} else { - // b = append(b, '{', '}', ',') - //} code = code.end.next } else { b = append(b, '{') @@ -1221,12 +1217,8 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, code *opcode) ([]byte case opStructEscapedFieldHead: ptr := load(ctxptr, code.idx) if ptr == 0 { - //if code.op == opStructEscapedFieldPtrHead { b = encodeNull(b) b = encodeComma(b) - //} else { - // b = append(b, '{', '}', ',') - //} code = code.end.next } else { b = append(b, '{')