diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-10-18 16:25:19 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-10-18 16:25:19 +0200 |
| commit | c51f4daa7d715a8f2df62f69625676996c4c92d0 (patch) | |
| tree | dea70d6f83cb06b1ead9b7e61050b0b82bf20f5f /core/fmt | |
| parent | 23391760837faf1aeba10ff49c90ca76879f8e2e (diff) | |
Let custom formatter example pass -vet-tabs if copied
Diffstat (limited to 'core/fmt')
| -rw-r--r-- | core/fmt/example.odin | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fmt/example.odin b/core/fmt/example.odin index 6929e9be7..a700b238e 100644 --- a/core/fmt/example.odin +++ b/core/fmt/example.odin @@ -10,14 +10,14 @@ SomeType :: struct { My_Custom_Base_Type :: distinct u32 main :: proc() { - // Ensure the fmt._user_formatters map is initialized + // Ensure the fmt._user_formatters map is initialized fmt.set_user_formatters(new(map[typeid]fmt.User_Formatter)) // Register custom formatters for my favorite types err := fmt.register_user_formatter(type_info_of(SomeType).id, SomeType_Formatter) - assert(err == .None) + assert(err == .None) err = fmt.register_user_formatter(type_info_of(My_Custom_Base_Type).id, My_Custom_Base_Formatter) - assert(err == .None) + assert(err == .None) // Use the custom formatters. fmt.printfln("SomeType{{42}}: '%v'", SomeType{42}) @@ -53,5 +53,4 @@ My_Custom_Base_Formatter :: proc(fi: ^fmt.Info, arg: any, verb: rune) -> bool { return false } return true -} - +}
\ No newline at end of file |