Skip to content

Commit 331f9a5

Browse files
committed
refactor(gateway): Use .clear instead of creating a new bytearray (#161)
1 parent 0344434 commit 331f9a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nextcore/gateway/decompressor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,5 @@ def decompress(self, data: bytes) -> bytes | None:
101101
raise ValueError("Data is corrupted. Please void all zlib context.") from None
102102

103103
# If successful, clear the pending data.
104-
self._buffer = bytearray()
104+
self._buffer.clear()
105105
return data

0 commit comments

Comments
 (0)