Make DismissEvent a unit struct
Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
parent
ac34229118
commit
233aac5573
11 changed files with 26 additions and 38 deletions
|
@ -106,10 +106,8 @@ impl Workspace {
|
|||
let notification = build_notification(cx);
|
||||
cx.subscribe(
|
||||
¬ification,
|
||||
move |this, handle, event: &DismissEvent, cx| match event {
|
||||
DismissEvent::Dismiss => {
|
||||
this.dismiss_notification_internal(type_id, id, cx);
|
||||
}
|
||||
move |this, handle, event: &DismissEvent, cx| {
|
||||
this.dismiss_notification_internal(type_id, id, cx);
|
||||
},
|
||||
)
|
||||
.detach();
|
||||
|
@ -260,7 +258,7 @@ pub mod simple_message_notification {
|
|||
}
|
||||
|
||||
pub fn dismiss(&mut self, cx: &mut ViewContext<Self>) {
|
||||
cx.emit(DismissEvent::Dismiss);
|
||||
cx.emit(DismissEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue