Skip to content

Commit 8d6956d

Browse files
dxdw233vil02
andauthored
Update src/math/karatsuba_multiplication.rs
Co-authored-by: Piotr Idzik <[email protected]>
1 parent 43dd375 commit 8d6956d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/math/karatsuba_multiplication.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ fn _multiply(num1: i128, num2: i128) -> i128 {
3636

3737
fn normalize(mut a: String, n: usize) -> String {
3838
let padding = n.saturating_sub(a.len());
39-
if padding > 0 {
40-
a.insert_str(0, &"0".repeat(padding));
41-
}
39+
a.insert_str(0, &"0".repeat(padding));
4240
a
4341
}
4442
#[cfg(test)]

0 commit comments

Comments
 (0)