forked from AbleOS/ableos
minor change
This commit is contained in:
parent
15b3fde6e6
commit
6dc17daa09
|
@ -90,7 +90,7 @@ format_inner := fn($T: type, v: T, str: ^u8, opts: FormatOptions): uint {
|
|||
return @inline(format_bool, v, str)
|
||||
} else if float(T) {
|
||||
return @inline(format_float, T, v, str, opts.decimal_digits)
|
||||
} else {
|
||||
} else if !primitive(T) {
|
||||
i := 0
|
||||
// name := @nameof(T)
|
||||
// len := string.length(name)
|
||||
|
@ -112,9 +112,10 @@ format_inner := fn($T: type, v: T, str: ^u8, opts: FormatOptions): uint {
|
|||
i += 1
|
||||
}
|
||||
return len
|
||||
}
|
||||
} else {
|
||||
panic("Unsupported formatter type\0")
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO:
|
||||
* Custom formatters using struct methods (T._fmt(self, str): uint),
|
||||
|
|
Loading…
Reference in a new issue