Remove delegate support from GPUI
We added this because we thought it would save some allocations when sending operations given that we could move them to the delegate upon notifying it, but the reality is that we serialize operations and that only requires a reference.
This commit is contained in:
parent
0a9595b5fa
commit
ef1ec88523
3 changed files with 10 additions and 124 deletions
|
@ -942,7 +942,7 @@ impl Project {
|
|||
remote_id
|
||||
))?,
|
||||
}
|
||||
cx.become_delegate(buffer, |this, buffer, event, cx| {
|
||||
cx.subscribe(buffer, |this, buffer, event, cx| {
|
||||
this.on_buffer_event(buffer, event, cx);
|
||||
})
|
||||
.detach();
|
||||
|
@ -1028,7 +1028,7 @@ impl Project {
|
|||
fn on_buffer_event(
|
||||
&mut self,
|
||||
buffer: ModelHandle<Buffer>,
|
||||
event: BufferEvent,
|
||||
event: &BufferEvent,
|
||||
cx: &mut ModelContext<Self>,
|
||||
) -> Option<()> {
|
||||
match event {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue