1
0
Fork 0
forked from AbleOS/ableos

less less broken

This commit is contained in:
koniifer 2024-12-17 18:22:39 +00:00 committed by peony
parent 8cca5c8d1b
commit eae328afdb
2 changed files with 2 additions and 2 deletions

View file

@ -182,7 +182,7 @@ FormatOptions := struct {
/* SAFETY: /* SAFETY:
* Assumes the buffer is wide enough for the formatted text and a null char * Assumes the buffer is wide enough for the formatted text and a null char
*/ */
format := fn($T: type, v: T, str: ^u8): ^u8 return @inline(format_args, T, v, str, .()) format := fn($T: type, v: T, str: ^u8): ^u8 return @inline(format_args, T, v, str, .{})
format_args := fn($T: type, v: T, str: ^u8, opts: FormatOptions): ^u8 { format_args := fn($T: type, v: T, str: ^u8, opts: FormatOptions): ^u8 {
@inline(string.clear, str) @inline(string.clear, str)

View file

@ -20,7 +20,7 @@ test := fn(): uint {
radix: 16, radix: 16,
})) }))
log.info(format_args(f64, math.LN_2, buffer, .{radix: 16})) log.info(format_args(f64, math.LN_2, buffer, .{radix: 16}))
// log.info(format([u8; 3], .(1, 2, 3), buffer)) log.info(format([u8; 3], .(1, 2, 3), buffer))
log.info(format(^SubThingy, &.(0.0, true), buffer)) log.info(format(^SubThingy, &.(0.0, true), buffer))
return 0 return 0