Remove unnecessary code

This commit is contained in:
Masaaki Goshima 2021-01-09 13:56:33 +09:00
parent eb6fb3b15d
commit bed16416aa
1 changed files with 0 additions and 8 deletions

View File

@ -1184,12 +1184,8 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, code *opcode) ([]byte
case opStructFieldHead: case opStructFieldHead:
ptr := load(ctxptr, code.idx) ptr := load(ctxptr, code.idx)
if ptr == 0 { if ptr == 0 {
//if code.op == opStructFieldPtrHead {
b = encodeNull(b) b = encodeNull(b)
b = encodeComma(b) b = encodeComma(b)
//} else {
// b = append(b, '{', '}', ',')
//}
code = code.end.next code = code.end.next
} else { } else {
b = append(b, '{') b = append(b, '{')
@ -1221,12 +1217,8 @@ func (e *Encoder) run(ctx *encodeRuntimeContext, b []byte, code *opcode) ([]byte
case opStructEscapedFieldHead: case opStructEscapedFieldHead:
ptr := load(ctxptr, code.idx) ptr := load(ctxptr, code.idx)
if ptr == 0 { if ptr == 0 {
//if code.op == opStructEscapedFieldPtrHead {
b = encodeNull(b) b = encodeNull(b)
b = encodeComma(b) b = encodeComma(b)
//} else {
// b = append(b, '{', '}', ',')
//}
code = code.end.next code = code.end.next
} else { } else {
b = append(b, '{') b = append(b, '{')