Skip to content

Commit 6dfc0bf

Browse files
authored
Merge pull request #305 from Quasilyte/quasilyte/assignOp
simplify `x = x <op> y` to `x <op>= y`
2 parents b9be8dd + c5ddac9 commit 6dfc0bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extra/binary_as_string_codec.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (codec *binaryAsStringCodec) Decode(ptr unsafe.Pointer, iter *jsoniter.Iter
153153
}
154154
b4 := rawBytes[i+3]
155155
b5 := rawBytes[i+4]
156-
i = i + 4
156+
i += 4
157157
b = readHex(iter, b4, b5)
158158
}
159159
bytes = append(bytes, b)
@@ -178,7 +178,7 @@ func readHex(iter *jsoniter.Iterator, b1, b2 byte) byte {
178178
iter.ReportError("read hex", "expects 0~9 or a~f, but found "+string([]byte{b1}))
179179
return 0
180180
}
181-
ret = ret * 16
181+
ret *= 16
182182
if b2 >= '0' && b2 <= '9' {
183183
ret = b2 - '0'
184184
} else if b2 >= 'a' && b2 <= 'f' {

0 commit comments

Comments
 (0)