Skip to content

Commit 2e68f58

Browse files
committed
std/fmt: fix compile issues of the Sprintg function
1 parent e579b4b commit 2e68f58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

std/fmt/format.jule

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ fn bprintf(fmt: str, args: ...any): []byte {
155155
}
156156

157157
// Tries to call reserved Str method for type.
158-
fn tryToCallStr[T](mut &sb: strings::Builder, t: T): (ok: bool) {
158+
fn tryToCallStr[T](mut &sb: *strings::Builder, t: T): (ok: bool) {
159159
const tt = comptime::TypeOf(T)
160160
const for _, method in tt.Decl().Methods() {
161161
const match method.Name() {
@@ -177,7 +177,7 @@ fn tryToCallStr[T](mut &sb: strings::Builder, t: T): (ok: bool) {
177177
ret false
178178
}
179179

180-
fn bprintgw[T](mut &sb: strings::Builder, t: T) {
180+
fn bprintgw[T](mut &sb: *strings::Builder, t: T) {
181181
const tt = comptime::TypeOf(T)
182182
const match {
183183
| tt.Bind():
@@ -286,6 +286,6 @@ fn bprintgw[T](mut &sb: strings::Builder, t: T) {
286286

287287
fn bprintg[T](t: T): []byte {
288288
mut sb := strings::Builder{}
289-
bprintgw(sb, t)
289+
bprintgw(&sb, t)
290290
ret unsafe { sb.Buf() }
291291
}

0 commit comments

Comments
 (0)