Skip to content

Commit a048638

Browse files
gdk: implement AsRef<Event> for Event
Needed for passing NONE_EVENT & or an Event instead of a sub-event type
1 parent a4aba82 commit a048638

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gdk4/src/event.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,13 @@ impl fmt::Debug for Event {
236236
}
237237
}
238238

239+
#[doc(hidden)]
240+
impl AsRef<Event> for Event {
241+
fn as_ref(&self) -> &Self {
242+
self
243+
}
244+
}
245+
239246
pub unsafe trait EventKind:
240247
StaticType + FromGlibPtrFull<*mut ffi::GdkEvent> + 'static
241248
{

0 commit comments

Comments
 (0)