# Use \`into_owned\` over \`to_string\` for \`Cow\<str\>\` \(\#39024\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 72948e14ee2047b55cdf96c4c041ec7f7713e77a

Requested commit: 72948e14ee2047b55cdf96c4c041ec7f7713e77a

Commit: 72948e14ee2047b55cdf96c4c041ec7f7713e77a

Tree: 5ad05ae5e0f956c3a4bf15d9dc7cecbab25dd9b8

Author: Lukas Wirth

Committer: GitHub

## Message

```
Use `into_owned` over `to_string` for `Cow<str>` (#39024)

This removes unnecessary allocations when the `Cow` is already owned


Release Notes:

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

## Parents

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

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