Return impl IntoElement from RenderOnce::render
This makes it a bit more approachable to implement. This required converting the state of Component to AnyElement, which costs an allocation. I'm hoping this will be ok performance-wise now that AnyElements use bump allocation, but I need to benchmark still.
This commit is contained in:
@@ -4305,7 +4305,7 @@ impl Element for DisconnectedOverlay {
|
||||
"Your connection to the remote project has been lost.",
|
||||
))
|
||||
.into_any();
|
||||
(overlay.layout(cx), overlay)
|
||||
(overlay.request_layout(cx), overlay)
|
||||
}
|
||||
|
||||
fn paint(&mut self, bounds: Bounds<Pixels>, overlay: &mut Self::State, cx: &mut WindowContext) {
|
||||
|
||||
Reference in New Issue
Block a user