@@ -104,7 +104,7 @@ func TestEncoderBytes(t *testing.T) {
104104 Encoder (p ).Bytes (v )
105105
106106 assert .Equal (t , 1 + 1 + 4 + len (v ), len (p .Bytes ()))
107- assert .Equal (t , ( Buffer )( v ) , (p .Bytes ())[1 + 1 + 4 :])
107+ assert .Equal (t , v , (p .Bytes ())[1 + 1 + 4 :])
108108
109109 p .Reset ()
110110 n := testing .AllocsPerRun (100 , func () {
@@ -124,7 +124,7 @@ func TestEncoderString(t *testing.T) {
124124 Encoder (p ).String (v )
125125
126126 assert .Equal (t , 1 + 1 + 4 + len (e ), len (p .Bytes ()))
127- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 + 1 + 4 :])
127+ assert .Equal (t , e , (p .Bytes ())[1 + 1 + 4 :])
128128
129129 p .Reset ()
130130 n := testing .AllocsPerRun (100 , func () {
@@ -144,7 +144,7 @@ func TestEncoderError(t *testing.T) {
144144 Encoder (p ).Error (v )
145145
146146 assert .Equal (t , 1 + 1 + 1 + 4 + len (e ), len (p .Bytes ()))
147- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 + 1 + 1 + 4 :])
147+ assert .Equal (t , e , (p .Bytes ())[1 + 1 + 1 + 4 :])
148148
149149 p .Reset ()
150150 n := testing .AllocsPerRun (100 , func () {
@@ -163,7 +163,7 @@ func TestEncoderBool(t *testing.T) {
163163 Encoder (p ).Bool (true )
164164
165165 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
166- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
166+ assert .Equal (t , e , (p .Bytes ())[1 :])
167167
168168 p .Reset ()
169169 n := testing .AllocsPerRun (100 , func () {
@@ -183,7 +183,7 @@ func TestEncoderUint8(t *testing.T) {
183183 Encoder (p ).Uint8 (v )
184184
185185 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
186- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
186+ assert .Equal (t , e , (p .Bytes ())[1 :])
187187
188188 p .Reset ()
189189 n := testing .AllocsPerRun (100 , func () {
@@ -203,7 +203,7 @@ func TestEncoderUint16(t *testing.T) {
203203 Encoder (p ).Uint16 (v )
204204
205205 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
206- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
206+ assert .Equal (t , e , (p .Bytes ())[1 :])
207207
208208 p .Reset ()
209209 n := testing .AllocsPerRun (100 , func () {
@@ -223,7 +223,7 @@ func TestEncoderUint32(t *testing.T) {
223223 Encoder (p ).Uint32 (v )
224224
225225 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
226- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
226+ assert .Equal (t , e , (p .Bytes ())[1 :])
227227
228228 p .Reset ()
229229 n := testing .AllocsPerRun (100 , func () {
@@ -243,7 +243,7 @@ func TestEncoderUint64(t *testing.T) {
243243 Encoder (p ).Uint64 (v )
244244
245245 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
246- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
246+ assert .Equal (t , e , (p .Bytes ())[1 :])
247247
248248 p .Reset ()
249249 n := testing .AllocsPerRun (100 , func () {
@@ -263,7 +263,7 @@ func TestEncoderInt32(t *testing.T) {
263263 Encoder (p ).Int32 (v )
264264
265265 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
266- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
266+ assert .Equal (t , e , (p .Bytes ())[1 :])
267267
268268 p .Reset ()
269269 n := testing .AllocsPerRun (100 , func () {
@@ -283,7 +283,7 @@ func TestEncoderInt64(t *testing.T) {
283283 Encoder (p ).Int64 (v )
284284
285285 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
286- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
286+ assert .Equal (t , e , (p .Bytes ())[1 :])
287287
288288 p .Reset ()
289289 n := testing .AllocsPerRun (100 , func () {
@@ -303,7 +303,7 @@ func TestEncoderFloat32(t *testing.T) {
303303 Encoder (p ).Float32 (v )
304304
305305 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
306- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
306+ assert .Equal (t , e , (p .Bytes ())[1 :])
307307
308308 p .Reset ()
309309 n := testing .AllocsPerRun (100 , func () {
@@ -323,7 +323,7 @@ func TestEncoderFloat64(t *testing.T) {
323323 Encoder (p ).Float64 (v )
324324
325325 assert .Equal (t , 1 + len (e ), len (p .Bytes ()))
326- assert .Equal (t , ( Buffer )( e ) , (p .Bytes ())[1 :])
326+ assert .Equal (t , e , (p .Bytes ())[1 :])
327327
328328 p .Reset ()
329329 n := testing .AllocsPerRun (100 , func () {
0 commit comments