Skip to content

Commit b3049c5

Browse files
committed
chore(bigint): silence IDE warnings — drop dead store, use destructuring swap
1 parent 9a4d332 commit b3049c5

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/bigint/big-integer-jsbn.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ function nbits(x: number): number {
8585
r += 2;
8686
}
8787
if ((t = x >> 1) !== 0) {
88-
x = t;
8988
r += 1;
9089
}
9190
return r;
@@ -1076,9 +1075,7 @@ export class BigInteger {
10761075
let x = this.s < 0 ? this.negate() : this.clone();
10771076
let y = a.s < 0 ? a.negate() : a.clone();
10781077
if (x.compareTo(y) < 0) {
1079-
const t = x;
1080-
x = y;
1081-
y = t;
1078+
[x, y] = [y, x];
10821079
}
10831080
let i = x.getLowestSetBit();
10841081
let g = y.getLowestSetBit();

0 commit comments

Comments
 (0)