Skip to content

Commit

Permalink
Disable invalid cast lint
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex committed Mar 12, 2024
1 parent 4c6f3c7 commit d7467bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/control/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,8 @@ impl Iterator for Events {
self.i += event.length as usize;
match event.type_ {
ffi::DRM_EVENT_VBLANK => {
#[allow(unknown_lints)]
#[allow(invalid_reference_casting)]
let vblank_event =
unsafe { &*(event as *const _ as *const ffi::drm_event_vblank) };
Some(Event::Vblank(VblankEvent {
Expand All @@ -1143,6 +1145,8 @@ impl Iterator for Events {
}))
}
ffi::DRM_EVENT_FLIP_COMPLETE => {
#[allow(unknown_lints)]
#[allow(invalid_reference_casting)]
let vblank_event =
unsafe { &*(event as *const _ as *const ffi::drm_event_vblank) };
Some(Event::PageFlip(PageFlipEvent {
Expand Down

0 comments on commit d7467bb

Please sign in to comment.