Skip to content

Commit 9186bf7

Browse files
fix code
1 parent 0b01aae commit 9186bf7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bytes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class DynamicBuffer {
2525

2626
constructor(capacity: number) {
2727
this.value = new Uint8Array(capacity);
28-
this.capacity = capacity = capacity;
28+
this.capacity = capacity;
2929
}
3030

3131
public write(bytes: Uint8Array): void {
@@ -51,7 +51,7 @@ export class DynamicBuffer {
5151
public writeByte(byte: number): void {
5252
if (this.length + 1 <= this.capacity) {
5353
this.value[this.length] = byte;
54-
this.length += 1;
54+
this.length++;
5555
return;
5656
}
5757
if (this.capacity === 0) {
@@ -63,7 +63,7 @@ export class DynamicBuffer {
6363
newValue.set(this.value.subarray(0, this.length));
6464
newValue[this.length] = byte;
6565
this.value = newValue;
66-
this.length += 1;
66+
this.length++;
6767
}
6868

6969
public readInto(target: Uint8Array): void {

0 commit comments

Comments
 (0)