| ... | @@ -504,6 +504,18 @@ pub fn formatType( | ... | @@ -504,6 +504,18 @@ pub fn formatType( |
| 504 | } | 504 | } |
| 505 | if (ptr_info.child == u8) { | 505 | if (ptr_info.child == u8) { |
| 506 | return formatText(value, fmt, options, writer); | 506 | return formatText(value, fmt, options, writer); |
| | 507 | } else if (fmt.len > 0 and ((fmt[0] == 'v') or (fmt[0] == 'V'))) { |
| | 508 | try format(writer, "[", .{}); |
| | 509 | var i: usize = 0; |
| | 510 | for (value) |one| { |
| | 511 | if (i == value.len - 1) { |
| | 512 | try format(writer, "{}", .{one}); |
| | 513 | } else{ |
| | 514 | try format(writer, "{}, ", .{one}); |
| | 515 | } |
| | 516 | i += 1; |
| | 517 | } |
| | 518 | return format(writer, "]", .{}); |
| 507 | } | 519 | } |
| 508 | return format(writer, "{}@{x}", .{ @typeName(ptr_info.child), @ptrToInt(value.ptr) }); | 520 | return format(writer, "{}@{x}", .{ @typeName(ptr_info.child), @ptrToInt(value.ptr) }); |
| 509 | }, | 521 | }, |