Skip to content

Commit 7eeefff

Browse files
maximkroukgithub-actions[bot]
authored andcommitted
ci: swift-format
1 parent 0990d6d commit 7eeefff

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

Sources/FunctionalBuilder/Builder.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ extension Builder {
153153
_block.builder._configurator.appendingConfiguration { base in
154154
if condition {
155155
return _block.keyPath.embed(thenValue(), in: base)
156-
}
157-
else {
156+
} else {
158157
return base
159158
}
160159
}
@@ -198,11 +197,9 @@ extension Builder {
198197
_block.builder._configurator.appendingConfiguration { base in
199198
if condition {
200199
return _block.keyPath.embed(thenValue(), in: base)
201-
}
202-
else if let value = elseValue?() {
200+
} else if let value = elseValue?() {
203201
return _block.keyPath.embed(value, in: base)
204-
}
205-
else {
202+
} else {
206203
return base
207204
}
208205
}

Sources/FunctionalClosures/Handler.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ public class Handler<Input> {
2727
https://github.com/MakeupStudio/swift-declarative-configuration/issues/1
2828
"""
2929
)
30-
public mutating func callAsFunction(_ behaviour: Behaviour, perform action: ((Input) -> Void)?) {
30+
public mutating func callAsFunction(_ behaviour: Behaviour, perform action: ((Input) -> Void)?)
31+
{
3132
switch behaviour {
3233
case .resetting:
3334
self.action = action
@@ -106,7 +107,8 @@ public class Handler2<T0, T1> {
106107
https://github.com/MakeupStudio/swift-declarative-configuration/issues/1
107108
"""
108109
)
109-
public mutating func callAsFunction(_ behaviour: Behaviour, perform action: ((T0, T1) -> Void)?) {
110+
public mutating func callAsFunction(_ behaviour: Behaviour, perform action: ((T0, T1) -> Void)?)
111+
{
110112
switch behaviour {
111113
case .resetting:
112114
self.action = action

Sources/FunctionalKeyPath/FunctionalKeyPath.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ extension FunctionalKeyPath {
143143
public static func key<Key: Hashable, _Value>(
144144
_ key: Key
145145
) -> FunctionalKeyPath
146-
where Root == Dictionary<Key, _Value>, Value == _Value? {
146+
where Root == [Key: _Value], Value == _Value? {
147147
FunctionalKeyPath(
148148
embed: { value, root in
149149
modification(of: root) { $0[key] = value }
@@ -188,8 +188,8 @@ extension FunctionalKeyPath {
188188
},
189189
extract: { root in
190190
return root.indices.contains(index)
191-
? root[index]
192-
: nil
191+
? root[index]
192+
: nil
193193
}
194194
)
195195
}

0 commit comments

Comments
 (0)