Skip to content

Commit 0087051

Browse files
authored
Fix some Xcode 14.3 warnings (pointfreeco#1920)
1 parent df92841 commit 0087051

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

Sources/ComposableArchitecture/Internal/RuntimeWarnings.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Foundation
2+
13
@_transparent
24
@usableFromInline
35
@inline(__always)

Sources/ComposableArchitecture/Reducer/AnyReducer/AnyReducer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ public struct AnyReducer<State, Action, Environment> {
445445
childAction,
446446
toChildEnvironment(parentEnvironment)
447447
)
448-
.map(toChildAction.embed)
448+
.map { toChildAction.embed($0) }
449449
}
450450
}
451451

@@ -704,7 +704,7 @@ public struct AnyReducer<State, Action, Environment> {
704704
childAction,
705705
toChildEnvironment(parentEnvironment)
706706
)
707-
.map(toChildAction.embed)
707+
.map { toChildAction.embed($0) }
708708

709709
return effects
710710
}

Sources/ComposableArchitecture/Reducer/Reducers/IfCaseLetReducer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,6 @@ public struct _IfCaseLetReducer<Parent: ReducerProtocol, Child: ReducerProtocol>
155155
}
156156
defer { state = self.toChildState.embed(childState) }
157157
return self.child.reduce(into: &childState, action: childAction)
158-
.map(self.toChildAction.embed)
158+
.map { self.toChildAction.embed($0) }
159159
}
160160
}

Sources/ComposableArchitecture/Reducer/Reducers/IfLetReducer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,6 @@ public struct _IfLetReducer<Parent: ReducerProtocol, Child: ReducerProtocol>: Re
148148
return .none
149149
}
150150
return self.child.reduce(into: &state[keyPath: self.toChildState]!, action: childAction)
151-
.map(self.toChildAction.embed)
151+
.map { self.toChildAction.embed($0) }
152152
}
153153
}

Sources/ComposableArchitecture/Reducer/Reducers/Scope.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,12 @@ public struct Scope<ParentState, ParentAction, Child: ReducerProtocol>: ReducerP
276276

277277
return self.child
278278
.reduce(into: &childState, action: childAction)
279-
.map(self.toChildAction.embed)
279+
.map { self.toChildAction.embed($0) }
280280

281281
case let .keyPath(toChildState):
282282
return self.child
283283
.reduce(into: &state[keyPath: toChildState], action: childAction)
284-
.map(self.toChildAction.embed)
284+
.map { self.toChildAction.embed($0) }
285285
}
286286
}
287287
}

0 commit comments

Comments
 (0)