Skip to content

Commit 884bead

Browse files
Update to latest Swift syntax
1 parent b6f09c8 commit 884bead

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Espresso/CaffeineController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let caffeineTaskStatusChangedNotificationKey = "io.raphaelhanneken.espresso.caff
3333
/// Manages the caffeinate task.
3434
final class CaffeineController {
3535
/// Holds a reference to the caffeinate task.
36-
private var caffeine: Task?
36+
private var caffeine: Process?
3737

3838
/// Checks whether a caffeinate task is currently running.
3939
var active: Bool {
@@ -75,9 +75,9 @@ final class CaffeineController {
7575
/// Creates and configures a caffeinate Task object.
7676
///
7777
/// - returns: A configured and launched caffeinate task object.
78-
private func caffeinateTask() -> Task? {
78+
private func caffeinateTask() -> Process? {
7979
// Create a new task object.
80-
let caffeinate = Task()
80+
let caffeinate = Process()
8181
// Set the task's properties and launch it.
8282
caffeinate.launchPath = "/usr/bin/caffeinate"
8383
caffeinate.arguments = ["-diu"]

Espresso/PreferenceManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ final class PreferenceManager {
5151
/// Register the default preferences.
5252
private func registerDefaultPreferences() {
5353
// Disable activateOnLaunch by default.
54-
userDefaults.register([activateOnLaunchKey: false])
54+
userDefaults.register(defaults: [activateOnLaunchKey: false])
5555
}
5656
}

0 commit comments

Comments
 (0)