a modern tui library written in zig

zig fmt

Changed files
+4 -5
src
widgets
+4 -5
src/widgets/Table.zig
··· 49 49 /// Note, if this is left `null` the Column Width will be dynamically calculated during `drawTable()`. 50 50 //col_width: ?usize = null, 51 51 col_width: WidthStyle = .dynamic_fill, 52 - 52 + 53 53 // Header Names 54 54 header_names: HeaderNames = .field_names, 55 55 // Column Indexes ··· 169 169 hdrs_buf[idx] = field.name; 170 170 } 171 171 break :hdrs hdrs_buf[0..num_hdrs]; 172 - }, 172 + }, 173 173 .custom => |hdrs| break :hdrs hdrs, 174 174 } 175 175 }; 176 - 177 176 178 177 const table_win = win.initChild( 179 178 0, ··· 283 282 const item_txt = switch (ItemT) { 284 283 []const u8 => item, 285 284 [][]const u8, []const []const u8 => strSlice: { 286 - if (alloc) |_alloc| break :strSlice try fmt.allocPrint(_alloc, "{s}", .{ item }); 285 + if (alloc) |_alloc| break :strSlice try fmt.allocPrint(_alloc, "{s}", .{item}); 287 286 break :strSlice item; 288 287 }, 289 288 else => nonStr: { ··· 294 293 switch (@typeInfo(ItemT).Optional.child) { 295 294 []const u8 => break :nonStr opt_item, 296 295 [][]const u8, []const []const u8 => { 297 - break :nonStr if (alloc) |_alloc| try fmt.allocPrint(_alloc, "{s}", .{ opt_item }) else fmt.comptimePrint("[unsupported ({s})]", .{@typeName(DataT)}); 296 + break :nonStr if (alloc) |_alloc| try fmt.allocPrint(_alloc, "{s}", .{opt_item}) else fmt.comptimePrint("[unsupported ({s})]", .{@typeName(DataT)}); 298 297 }, 299 298 else => { 300 299 break :nonStr if (alloc) |_alloc| try fmt.allocPrint(_alloc, "{any}", .{opt_item}) else fmt.comptimePrint("[unsupported ({s})]", .{@typeName(DataT)});