From b03af80076bc65eb5387928fb1e1bf1d11c163b6 Mon Sep 17 00:00:00 2001 From: Ben Rimmington Date: Fri, 17 Jan 2020 07:33:36 +0000 Subject: [PATCH] [BigInt] Change `self = -self` to `self.negate()` --- Sources/BigInt/BigInt.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/BigInt/BigInt.swift b/Sources/BigInt/BigInt.swift index 82f10db..17499ca 100644 --- a/Sources/BigInt/BigInt.swift +++ b/Sources/BigInt/BigInt.swift @@ -315,7 +315,7 @@ extension BigInt: SignedNumeric { words[i] = ~words[i] } } - + BigInt._dropExcessWords(words: &words) } @@ -362,7 +362,7 @@ extension BigInt: BinaryInteger { } if isNegative { - self = -self + self.negate() } }