File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ extension Regex {
16
16
public init < Content: RegexComponent > (
17
17
@RegexComponentBuilder _ content: ( ) -> Content
18
18
) where Content. Output == Output {
19
- self . init ( content ( ) )
19
+ self = content ( ) . regex
20
20
}
21
21
}
22
22
Original file line number Diff line number Diff line change @@ -81,12 +81,6 @@ public struct Regex<Output>: RegexComponent {
81
81
self . init ( ast: try ! parseWithDelimiters ( pattern) )
82
82
}
83
83
84
- public init < Content: RegexComponent > (
85
- _ content: Content
86
- ) where Content. Output == Output {
87
- self = content. regex
88
- }
89
-
90
84
public var regex : Regex < Output > {
91
85
self
92
86
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class RegexDSLTests: XCTestCase {
22
22
line: UInt = #line,
23
23
@RegexComponentBuilder _ content: ( ) -> Content
24
24
) throws {
25
- let regex = Regex ( content ( ) )
25
+ let regex = content ( )
26
26
for (input, maybeExpectedCaptures) in tests {
27
27
let maybeMatch = input. match ( regex)
28
28
if let expectedCaptures = maybeExpectedCaptures {
You can’t perform that action at this time.
0 commit comments