Skip to content

Commit

Permalink
- Forced non-optional cbservice, leaving exception on throw
Browse files Browse the repository at this point in the history
  • Loading branch information
rickytribbia committed Sep 23, 2021
1 parent 2f73f84 commit 2d0b8d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Bluejay/Bluejay/CharacteristicIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public struct CharacteristicIdentifier {

/// Create a `CharacteristicIdentifier` using a `CBCharacterstic`.
public init(_ cbCharacteristic: CBCharacteristic) {
self.service = ServiceIdentifier(uuid: cbCharacteristic.service.uuid)
self.service = ServiceIdentifier(uuid: cbCharacteristic.service!.uuid)
self.uuid = cbCharacteristic.uuid
}

Expand All @@ -46,7 +46,7 @@ public struct CharacteristicIdentifier {

/// Check equality between a `CharacteristicIdentifier` and a `CBCharacterstic`.
public static func == (lhs: CharacteristicIdentifier, rhs: CBCharacteristic) -> Bool {
return (lhs.uuid == rhs.uuid) && (lhs.service.uuid == rhs.service.uuid)
return (lhs.uuid == rhs.uuid) && (lhs.service.uuid == rhs.service!.uuid)
}
}

Expand Down

0 comments on commit 2d0b8d5

Please sign in to comment.