Browse Source

codec: remove comments and empty lines (nit)

Ugorji Nwoke 6 years ago
parent
commit
9755d889f6
2 changed files with 0 additions and 7 deletions
  1. 0 4
      codec/cbor_test.go
  2. 0 3
      codec/encode.go

+ 0 - 4
codec/cbor_test.go

@@ -320,7 +320,6 @@ func TestCborSkipTags(t *testing.T) {
 
 
 	var gold []byte
 	var gold []byte
 	NewEncoderBytes(&gold, &h).MustEncode(v)
 	NewEncoderBytes(&gold, &h).MustEncode(v)
-
 	// xdebug2f("encoded:    gold: %v", gold)
 	// xdebug2f("encoded:    gold: %v", gold)
 
 
 	// w.b is the encoded bytes
 	// w.b is the encoded bytes
@@ -333,7 +332,6 @@ func TestCborSkipTags(t *testing.T) {
 	NewDecoderBytes(w.b, &h).MustDecode(&v2)
 	NewDecoderBytes(w.b, &h).MustDecode(&v2)
 	testDeepEqualErr(v, v2, t, "cbor-skip-tags--no-tags-")
 	testDeepEqualErr(v, v2, t, "cbor-skip-tags--no-tags-")
 
 
-	// Now, decode that stream into it.
 	var v3 Tcbortags
 	var v3 Tcbortags
 	doAddTag = true
 	doAddTag = true
 	fnEncode()
 	fnEncode()
@@ -341,8 +339,6 @@ func TestCborSkipTags(t *testing.T) {
 	NewDecoderBytes(w.b, &h).MustDecode(&v3)
 	NewDecoderBytes(w.b, &h).MustDecode(&v3)
 	testDeepEqualErr(v, v2, t, "cbor-skip-tags--has-tags")
 	testDeepEqualErr(v, v2, t, "cbor-skip-tags--has-tags")
 
 
-	// Then get bytes with tags added, decode that stream, and check against golden v
-
 	// Github 300 - tests naked path
 	// Github 300 - tests naked path
 	{
 	{
 		expected := []interface{}{"x", uint64(0x0)}
 		expected := []interface{}{"x", uint64(0x0)}

+ 0 - 3
codec/encode.go

@@ -1487,11 +1487,8 @@ func (e *Encoder) mustEncode(v interface{}) {
 		e.wf.buf = e.wf.bytesBufPooler.get(e.wf.sz)
 		e.wf.buf = e.wf.bytesBufPooler.get(e.wf.sz)
 	}
 	}
 	e.wf.calls++
 	e.wf.calls++
-
 	e.encode(v)
 	e.encode(v)
-
 	e.wf.calls--
 	e.wf.calls--
-
 	if e.wf.calls == 0 {
 	if e.wf.calls == 0 {
 		e.e.atEndOfEncode()
 		e.e.atEndOfEncode()
 		e.w().end()
 		e.w().end()