Skip to content

Commit e655b8f

Browse files
authored
chore: update moon.pkg.json to include string import (#2270)
1 parent d6a152f commit e655b8f

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

bigint/bigint_nonjs.mbt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,15 +1202,13 @@ pub fn BigInt::to_hex(self : BigInt, uppercase~ : Bool = true) -> String {
12021202
if i != self.len - 1 && tmp.length() < radix_bit_len / 4 {
12031203
let pad = radix_bit_len / 4 - tmp.length()
12041204
// pad with zeros if not the last limb(the front of the BigInt)
1205-
for j in 0..<pad {
1206-
tmp = "0" + tmp
1207-
}
1205+
tmp = "0".repeat(pad) + tmp
12081206
}
1209-
result = result + tmp
1207+
result += tmp // CR: weird coverage visualized
12101208
}
12111209
if result == "" {
1212-
"0"
1213-
} else if self.sign == Negative {
1210+
"0" // CR: weird coverage visualized
1211+
} else if self.sign is Negative {
12141212
"-" + result
12151213
} else {
12161214
result

bigint/moon.pkg.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"moonbitlang/core/uint",
66
"moonbitlang/core/json",
77
"moonbitlang/core/quickcheck",
8-
"moonbitlang/core/quickcheck/splitmix"
8+
"moonbitlang/core/quickcheck/splitmix",
9+
"moonbitlang/core/string"
910
],
1011
"targets": {
1112
"bigint_js.mbt": ["js"],

0 commit comments

Comments
 (0)