We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Text
1 parent c175e8c commit 5057b66Copy full SHA for 5057b66
Sources/TextBuilder/TextBuilder.swift
@@ -61,7 +61,7 @@ public struct TextBuilderWith<Separator: TextBuilderSeparator> {
61
}
62
63
@inlinable
64
- public static func buildExpression(_ component: Text?) -> Text? {
+ public static func buildExpression(_ component: Text) -> Text? {
65
component
66
67
@@ -109,12 +109,8 @@ public struct TextBuilderWith<Separator: TextBuilderSeparator> {
109
110
111
112
- public static func buildExpression(_ text: Text?) -> [Text] {
113
- if let text = text {
114
- return [text]
115
- } else {
116
- return []
117
- }
+ public static func buildExpression(_ text: Text) -> [Text] {
+ [text]
118
119
120
0 commit comments