# gpui: Remove intermediate allocations when reconstructing text from a \`TextLayout\` \(\#45037\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/949cbc2b185bbe0aa7a8d6429745265ee0f240ff)

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

Visibility: public

Requested revision: 949cbc2b185bbe0aa7a8d6429745265ee0f240ff

Requested commit: 949cbc2b185bbe0aa7a8d6429745265ee0f240ff

Commit: 949cbc2b185bbe0aa7a8d6429745265ee0f240ff

Tree: fc7d958ab3100277465f660e18338a17fd7055df

Author: tidely

Committer: GitHub

## Message

```
gpui: Remove intermediate allocations when reconstructing text from a `TextLayout` (#45037)

Closes #ISSUE

Remove some intermediate allocations when reconstructing text or wrapped
text from a `TextLayout`. Currently creates a intermediate `Vec<String>`
which gets joined, when you could join an `impl Iterator<Item = &str>`

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

- [6f5da5e34e85654a3c5d1328b8508d83fed91535](https://git.cafe/gitcafe/zed/commit/6f5da5e34e85654a3c5d1328b8508d83fed91535?format=markdown)

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