Skip to content

Commit

Permalink
Use type alias for MonitorUuid
Browse files Browse the repository at this point in the history
  • Loading branch information
killercup committed Dec 17, 2024
1 parent 4b5ee2b commit 3558bb7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/platform_impl/apple/appkit/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ impl VideoModeHandle {
#[derive(Clone)]
pub struct MonitorHandle(CGDirectDisplayID);

#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
struct MonitorUuid([u8; 16]);
type MonitorUuid = [u8; 16];

impl MonitorHandle {
/// Internal comparisons of [`MonitorHandle`]s are done first requesting a UUID for the handle.
Expand All @@ -144,7 +143,7 @@ impl MonitorHandle {
CFUUID::wrap_under_create_rule(ffi::CGDisplayCreateUUIDFromDisplayID(self.0))
};
let uuid = unsafe { CFUUIDGetUUIDBytes(cf_uuid.as_concrete_TypeRef()) };
MonitorUuid([
MonitorUuid::from([
uuid.byte0,
uuid.byte1,
uuid.byte2,
Expand Down

0 comments on commit 3558bb7

Please sign in to comment.