UUID.swift 299 B

123456789101112131415161718
  1. //
  2. // UUID.swift
  3. // LoopKitTests
  4. //
  5. // Copyright © 2018 LoopKit Authors. All rights reserved.
  6. //
  7. import Foundation
  8. extension UUID {
  9. var data: Data {
  10. return withUnsafePointer(to: uuid) {
  11. return Data(bytes: $0, count: MemoryLayout.size(ofValue: uuid))
  12. }
  13. }
  14. }