Skip to content

Commit eed2624

Browse files
committed
if let shorthand syntax
1 parent 8de85be commit eed2624

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Sources/_Subprocess/Platforms/Subprocess+Linux.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ private let setup: () = {
262262
default:
263263
fatalError("Unexpected exit status: \(siginfo.si_code)")
264264
}
265-
if let status = status {
265+
if let status {
266266
let pid = siginfo._sifields._sigchld.si_pid
267267
if let existing = continuations.removeValue(forKey: pid),
268268
case .continuation(let c) = existing {

Sources/_Subprocess/Platforms/Subprocess+Unix.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ extension FileDescriptor {
404404
continuation.resume(throwing: POSIXError(.init(rawValue: error) ?? .ENODEV))
405405
return
406406
}
407-
if let data = data {
407+
if let data {
408408
buffer += Data(data)
409409
}
410410
if done {

Sources/_Subprocess/Platforms/Subprocess+Windows.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ extension FileDescriptor {
10701070
}
10711071
}
10721072
}
1073-
if let lastError = lastError {
1073+
if let lastError {
10741074
continuation.resume(throwing: CocoaError.windowsError(
10751075
underlying: lastError,
10761076
errorCode: .fileReadUnknown)

Sources/_Subprocess/Subprocess+Configuration.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ extension Subprocess {
123123
errorError = error // lolol
124124
}
125125

126-
if let inputError = inputError {
126+
if let inputError {
127127
throw inputError
128128
}
129129

130-
if let outputError = outputError {
130+
if let outputError {
131131
throw outputError
132132
}
133133

134-
if let errorError = errorError {
134+
if let errorError {
135135
throw errorError
136136
}
137137
}
@@ -165,13 +165,13 @@ extension Subprocess {
165165
errorError = error
166166
}
167167

168-
if let inputError = inputError {
168+
if let inputError {
169169
throw inputError
170170
}
171-
if let outputError = outputError {
171+
if let outputError {
172172
throw outputError
173173
}
174-
if let errorError = errorError {
174+
if let errorError {
175175
throw errorError
176176
}
177177
}

0 commit comments

Comments
 (0)