# Return \`impl IntoElement\` in \`Render\` and \`RenderOnce\` traits \(\#3839\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5f8417249c17f0e899b1591d37247107a22657f9

Requested commit: 5f8417249c17f0e899b1591d37247107a22657f9

Commit: 5f8417249c17f0e899b1591d37247107a22657f9

Tree: e8bfbf477dc11fc80d71480b70c2bf98b6010764

Author: Nathan Sobo

Committer: GitHub

## Message

```
Return `impl IntoElement` in `Render` and `RenderOnce` traits (#3839)

- Returning `IntoElement` because it's more universal than `Element` and
allows us to easily return components.
- Using `impl IntoElement` in `RenderOnce` for consistency, which
requires `Component` to allocate an `AnyElement`. We use a bump
allocated arena anyway for these, and my benchmark doesn't show an
impact.


![frame-time-histogram](https://github.com/zed-industries/zed/assets/1789/d3889cca-9ebc-4d72-aa68-34a5be3bad3c)

In this histogram, frames-0 is this PR, frames-1 is main.

Release Notes:

- N/A
```

## Parents

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

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

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