# fix std.fmt to handle std.SegmentedList · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/bc982e65cf77aa6551029620ceaec8f3ae49202f)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: bc982e65cf77aa6551029620ceaec8f3ae49202f

Requested commit: bc982e65cf77aa6551029620ceaec8f3ae49202f

Commit: bc982e65cf77aa6551029620ceaec8f3ae49202f

Tree: 3b53ffc17828a8aa6a1a847b0914ec74a827c1ca

Author: Michael Dusan

Committer: Andrew Kelley

## Message

```
fix std.fmt to handle std.SegmentedList

- add guards for use of prealloc_exp in SegmentedList
- define prealloc_exp even when invalid because std.fmt comptime
  triggers lazy-init
- fix std.fmt to print arrays of length 0 as style "[0]<typename>"
  because "<typename>@address" is n/a without address

```

## Parents

- [8736a5be2ac280db8fd34c86efd1b764a255f23c](https://git.cafe/gitcafe/zig/commit/8736a5be2ac280db8fd34c86efd1b764a255f23c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/bc982e65cf77aa6551029620ceaec8f3ae49202f?format=markdown)
