mirror of
https://github.com/seemoo-lab/openhaystack.git
synced 2026-02-14 17:49:54 +00:00
Fix swift-format complaints
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"]
|
||||
@@ -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
|
||||
|
||||
@@ -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.") })
|
||||
@@ -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
|
||||
|
||||
@@ -75,7 +75,7 @@ struct ManageAccessoriesView: View {
|
||||
|
||||
}
|
||||
|
||||
/// All toolbar buttons shown
|
||||
/// All toolbar buttons shown.
|
||||
var toolbarView: some View {
|
||||
Group {
|
||||
Spacer()
|
||||
|
||||
Reference in New Issue
Block a user