zed/crates/ui2
Nathan Sobo 5f8417249c
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
2024-01-03 10:37:26 -07:00
..
docs WIP: Work toward eliminating Component trait 2023-11-18 00:03:23 -07:00
src Return impl IntoElement in Render and RenderOnce traits (#3839) 2024-01-03 10:37:26 -07:00
Cargo.toml ui2: Reference theme2 and settings2 crates without the 2 (#3424) 2023-11-28 15:30:29 -05:00