Skip to content

Commit

Permalink
std::fmt: minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Aug 12, 2024
1 parent 218f3ba commit b29561d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/internal/fmt/format.jule
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fn applyFmt(mut &fmt: []byte, mut &buf: StrBuilder, mut &j: int, args: ...any) {
// For this function, returned []byte is might be string literal actually.
// Be careful about mutating it.
fn Format(fmt: str, args: ...any): []byte {
mut fmtBytes := unsafe::BytesFromStr(fmt)
mut fmtBytes := unsafe::StrBytes(fmt)
if len(args) == 0 {
ret fmtBytes
}
Expand Down

0 comments on commit b29561d

Please sign in to comment.