# Eliminate generic duplication in \`allocPrint\` · gitcafe/zig

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

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

Visibility: public

Requested revision: cc25756b3f33578774b557bdf09dcc9e918c1e5a

Requested commit: cc25756b3f33578774b557bdf09dcc9e918c1e5a

Commit: cc25756b3f33578774b557bdf09dcc9e918c1e5a

Tree: e713795cfeaa0674321003bf2b6d7d847cf6a89c

Author: Ian Johnson

Committer: Ian Johnson

## Message

```
Eliminate generic duplication in `allocPrint`

Since `bufPrint` and `count` both control the writers used internally,
they can leverage type-erased writers while maintaining correct error
handling. This reduces generic instantiations when using `allocPrint`,
which calls both `count` and `bufPrint` internally.

```

## Parents

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

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