From 116db3bf0069583e8e473ce1304ab1a9809f7b40 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Mon, 4 Nov 2024 10:47:04 -0500 Subject: [PATCH] #154 Fix `UUID` Embedded Swift support --- Sources/Bluetooth/Extensions/UUID.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Bluetooth/Extensions/UUID.swift b/Sources/Bluetooth/Extensions/UUID.swift index 850916f9a..a9679fbfa 100644 --- a/Sources/Bluetooth/Extensions/UUID.swift +++ b/Sources/Bluetooth/Extensions/UUID.swift @@ -77,7 +77,7 @@ public struct UUID: Sendable { } } -internal typealias _UUID = Bluetooth.UUID // Built-in UUID type +public typealias _UUID = Bluetooth.UUID // Built-in UUID type #endif @@ -213,7 +213,7 @@ extension _UUID : Comparable { var diff: Int = 0 withUnsafeBytes(of: &leftUUID) { leftPtr in withUnsafeBytes(of: &rightUUID) { rightPtr in - for offset in (0 ..< MemoryLayout.size).reversed() { + for offset in (0 ..< MemoryLayout.size).reversed() { diff = Int(leftPtr.load(fromByteOffset: offset, as: UInt8.self)) - Int(rightPtr.load(fromByteOffset: offset, as: UInt8.self)) // Constant time, no branching equivalent of