Skip to content

Commit

Permalink
Fix swift-format complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittner committed Mar 16, 2021
1 parent 9f8352b commit d1731c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class AccessoryController: ObservableObject {
return accessory
}

/// Export the accessories property list so it can be imported at another location
/// Export the accessories property list so it can be imported at another location.
func export(accessories: [Accessory]) throws -> URL {
let propertyList = try PropertyListEncoder().encode(accessories)

Expand All @@ -120,7 +120,7 @@ class AccessoryController: ObservableObject {
throw ImportError.cancelled
}

/// Let the user select a file to import the accessories exported by another OpenHaystack instance
/// Let the user select a file to import the accessories exported by another OpenHaystack instance.
func importAccessories() throws {
let openPanel = NSOpenPanel()
openPanel.allowedFileTypes = ["plist"]
Expand Down Expand Up @@ -156,7 +156,7 @@ class AccessoryController: ObservableObject {

//MARK: Location reports

/// Download the location reports from
/// Download the location reports from.
/// - Parameter completion: called when the reports have been succesfully downloaded or the request has failed
func downloadLocationReports(completion: @escaping (Result<Void, OpenHaystackMainView.AlertType>) -> Void) {
AnisetteDataManager.shared.requestAnisetteData { result in
Expand Down
4 changes: 2 additions & 2 deletions OpenHaystack/OpenHaystack/HaystackApp/ESP32Controller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct ESP32Controller {
Bundle.main.resourceURL?.appendingPathComponent("ESP32")
}

/// Tries to find the port / path at which the ESP32 module is attached
/// Tries to find the port / path at which the ESP32 module is attached.
static func findPort() -> [URL] {
// List all ports
let ports = try? FileManager.default.contentsOfDirectory(atPath: "/dev").filter({ $0.contains("cu.") })
Expand All @@ -24,7 +24,7 @@ struct ESP32Controller {
return portURLs ?? []
}

/// Runs the script to flash the firmware on an ESP32
/// Runs the script to flash the firmware on an ESP32.
static func flashToESP32(accessory: Accessory, port: URL, completion: @escaping (Result<Void, Error>) -> Void) throws {

// Copy firmware to a temporary directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct ManageAccessoriesView: View {

}

/// All toolbar buttons shown
/// All toolbar buttons shown.
var toolbarView: some View {
Group {
Spacer()
Expand Down

0 comments on commit d1731c6

Please sign in to comment.