Skip to content

Commit

Permalink
Updated for Swift 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Jun 29, 2021
1 parent e9dd733 commit 2dd9e72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 2 additions & 7 deletions Sources/BluetoothLinux/POSIXError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ public extension POSIXError {
}

internal extension POSIXErrorCode {

var errorMessage: String {
return String(cString: strerror(rawValue), encoding: .utf8)!
}
}

#if !swift(>=5.4)
// MARK: - CustomStringConvertible

// https://github.com/apple/swift/pull/24149
Expand All @@ -58,13 +60,6 @@ extension POSIXError: CustomStringConvertible {
return _nsError.description
}
}

#if os(macOS)
extension POSIXErrorCode: CustomStringConvertible {
public var description: String {
return rawValue.description
}
}
#endif

// MARK: - LocalizedError
Expand Down
2 changes: 0 additions & 2 deletions Sources/BluetoothLinux/Scan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ public extension HostController {
/// Otherwise, if flags is set to 0, then the results of previous inquiries may be returned,
/// even if the devices aren't in range anymore.
case flushCache = 0x0001

public static let allCases: Set<ScanOption> = [.flushCache]
}

struct InquiryResult {
Expand Down

0 comments on commit 2dd9e72

Please sign in to comment.