# agent: Reduce allocations \(\#30220\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b34f19a46f3be515d324d5ec21c0f0e19e941794

Requested commit: b34f19a46f3be515d324d5ec21c0f0e19e941794

Commit: b34f19a46f3be515d324d5ec21c0f0e19e941794

Tree: 732e9716bea81dbfe747534f629dfbee6e7c1694

Author: tidely

Committer: GitHub

## Message

```
agent: Reduce allocations (#30220)

Just a tiny patch to reduce allocations during context loading

Calling `.cloned()` on an iterator clones each element one by one, while
`into_iter().collect()` pre-allocates the resulting `Vec`

Release Notes:

- N/A
```

## Parents

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

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