Skip to content

Commit 9cd2649

Browse files
mluisbrownactions-user
authored andcommitted
Run swift-format
1 parent 3fae989 commit 9cd2649

File tree

6 files changed

+790
-790
lines changed

6 files changed

+790
-790
lines changed

Sources/ComposableArchitecture/Internal/Deprecations.swift

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,88 @@
11
#if canImport(SwiftUI)
22

3-
import SwiftUI
3+
import SwiftUI
44

5-
// NB: Deprecated after 0.10.0:
5+
// NB: Deprecated after 0.10.0:
66

7-
@available(iOS 13, macOS 10.15, macCatalyst 13, tvOS 13, watchOS 6, *)
8-
extension ActionSheetState {
9-
@available(*, deprecated, message: "'title' and 'message' should be 'TextState'")
10-
@_disfavoredOverload
11-
public init(
12-
title: LocalizedStringKey,
13-
message: LocalizedStringKey? = nil,
14-
buttons: [Button]
15-
) {
16-
self.init(
17-
title: .init(title),
18-
message: message.map { .init($0) },
19-
buttons: buttons
20-
)
7+
@available(iOS 13, macOS 10.15, macCatalyst 13, tvOS 13, watchOS 6, *)
8+
extension ActionSheetState {
9+
@available(*, deprecated, message: "'title' and 'message' should be 'TextState'")
10+
@_disfavoredOverload
11+
public init(
12+
title: LocalizedStringKey,
13+
message: LocalizedStringKey? = nil,
14+
buttons: [Button]
15+
) {
16+
self.init(
17+
title: .init(title),
18+
message: message.map { .init($0) },
19+
buttons: buttons
20+
)
21+
}
2122
}
22-
}
2323

24-
@available(iOS 13, macOS 10.15, macCatalyst 13, tvOS 13, watchOS 6, *)
25-
extension AlertState {
26-
@available(*, deprecated, message: "'title' and 'message' should be 'TextState'")
27-
@_disfavoredOverload
28-
public init(
29-
title: LocalizedStringKey,
30-
message: LocalizedStringKey? = nil,
31-
dismissButton: Button? = nil
32-
) {
33-
self.init(
34-
title: .init(title),
35-
message: message.map { .init($0) },
36-
dismissButton: dismissButton
37-
)
38-
}
24+
@available(iOS 13, macOS 10.15, macCatalyst 13, tvOS 13, watchOS 6, *)
25+
extension AlertState {
26+
@available(*, deprecated, message: "'title' and 'message' should be 'TextState'")
27+
@_disfavoredOverload
28+
public init(
29+
title: LocalizedStringKey,
30+
message: LocalizedStringKey? = nil,
31+
dismissButton: Button? = nil
32+
) {
33+
self.init(
34+
title: .init(title),
35+
message: message.map { .init($0) },
36+
dismissButton: dismissButton
37+
)
38+
}
3939

40-
@available(*, deprecated, message: "'title' and 'message' should be 'TextState'")
41-
@_disfavoredOverload
42-
public init(
43-
title: LocalizedStringKey,
44-
message: LocalizedStringKey? = nil,
45-
primaryButton: Button,
46-
secondaryButton: Button
47-
) {
48-
self.init(
49-
title: .init(title),
50-
message: message.map { .init($0) },
51-
primaryButton: primaryButton,
52-
secondaryButton: secondaryButton
53-
)
40+
@available(*, deprecated, message: "'title' and 'message' should be 'TextState'")
41+
@_disfavoredOverload
42+
public init(
43+
title: LocalizedStringKey,
44+
message: LocalizedStringKey? = nil,
45+
primaryButton: Button,
46+
secondaryButton: Button
47+
) {
48+
self.init(
49+
title: .init(title),
50+
message: message.map { .init($0) },
51+
primaryButton: primaryButton,
52+
secondaryButton: secondaryButton
53+
)
54+
}
5455
}
55-
}
5656

57-
@available(iOS 13, macOS 10.15, macCatalyst 13, tvOS 13, watchOS 6, *)
58-
extension AlertState.Button {
59-
@available(*, deprecated, message: "'label' should be 'TextState'")
60-
@_disfavoredOverload
61-
public static func cancel(
62-
_ label: LocalizedStringKey,
63-
send action: Action? = nil
64-
) -> Self {
65-
Self(action: action, type: .cancel(label: .init(label)))
66-
}
57+
@available(iOS 13, macOS 10.15, macCatalyst 13, tvOS 13, watchOS 6, *)
58+
extension AlertState.Button {
59+
@available(*, deprecated, message: "'label' should be 'TextState'")
60+
@_disfavoredOverload
61+
public static func cancel(
62+
_ label: LocalizedStringKey,
63+
send action: Action? = nil
64+
) -> Self {
65+
Self(action: action, type: .cancel(label: .init(label)))
66+
}
6767

68-
@available(*, deprecated, message: "'label' should be 'TextState'")
69-
@_disfavoredOverload
70-
public static func `default`(
71-
_ label: LocalizedStringKey,
72-
send action: Action? = nil
73-
) -> Self {
74-
Self(action: action, type: .default(label: .init(label)))
75-
}
68+
@available(*, deprecated, message: "'label' should be 'TextState'")
69+
@_disfavoredOverload
70+
public static func `default`(
71+
_ label: LocalizedStringKey,
72+
send action: Action? = nil
73+
) -> Self {
74+
Self(action: action, type: .default(label: .init(label)))
75+
}
7676

77-
@available(*, deprecated, message: "'label' should be 'TextState'")
78-
@_disfavoredOverload
79-
public static func destructive(
80-
_ label: LocalizedStringKey,
81-
send action: Action? = nil
82-
) -> Self {
83-
Self(action: action, type: .destructive(label: .init(label)))
77+
@available(*, deprecated, message: "'label' should be 'TextState'")
78+
@_disfavoredOverload
79+
public static func destructive(
80+
_ label: LocalizedStringKey,
81+
send action: Action? = nil
82+
) -> Self {
83+
Self(action: action, type: .destructive(label: .init(label)))
84+
}
8485
}
85-
}
8686
#endif
8787

8888
// NB: Deprecated after 0.9.0:

0 commit comments

Comments
 (0)