kopia lustrzana https://github.com/micropython/micropython-lib
Moved assignment out of assert statement
rodzic
befd307535
commit
7424b120b5
|
@ -830,8 +830,8 @@ class Buffer:
|
||||||
# Called by the producer to indicate it wrote nbytes into the buffer.
|
# Called by the producer to indicate it wrote nbytes into the buffer.
|
||||||
ist = machine.disable_irq()
|
ist = machine.disable_irq()
|
||||||
try:
|
try:
|
||||||
assert nbytes <= self._l - (_w := self._w) # can't say we wrote more than was pended
|
assert nbytes <= self._l - self._w # can't say we wrote more than was pended
|
||||||
if self._n == _w:
|
if self._n == self._w:
|
||||||
# no data was read while the write was happening, so the buffer is already in place
|
# no data was read while the write was happening, so the buffer is already in place
|
||||||
# (this is the fast path)
|
# (this is the fast path)
|
||||||
self._n += nbytes
|
self._n += nbytes
|
||||||
|
|
Ładowanie…
Reference in New Issue