@@ -784,7 +784,7 @@ extension Repeat {
784784 _ component: Component ,
785785 count: Int
786786 ) where RegexOutput == Substring {
787- assert ( count > 0 , " Must specify a positive count " )
787+ precondition ( count >= 0 , " Must specify a positive count " )
788788 let factory = makeFactory ( )
789789 self . init ( factory. exactly ( count, component) )
790790 }
@@ -795,7 +795,7 @@ extension Repeat {
795795 count: Int ,
796796 @RegexComponentBuilder _ component: ( ) -> Component
797797 ) where RegexOutput == Substring {
798- assert ( count > 0 , " Must specify a positive count " )
798+ precondition ( count >= 0 , " Must specify a positive count " )
799799 let factory = makeFactory ( )
800800 self . init ( factory. exactly ( count, component ( ) ) )
801801 }
@@ -913,7 +913,7 @@ extension Repeat {
913913 _ component: Component ,
914914 count: Int
915915 ) where RegexOutput == ( Substring , C1 ? ) , Component. RegexOutput == ( W , C1 ) {
916- assert ( count > 0 , " Must specify a positive count " )
916+ precondition ( count >= 0 , " Must specify a positive count " )
917917 let factory = makeFactory ( )
918918 self . init ( factory. exactly ( count, component) )
919919 }
@@ -923,7 +923,7 @@ extension Repeat {
923923 count: Int ,
924924 @RegexComponentBuilder _ component: ( ) -> Component
925925 ) where RegexOutput == ( Substring , C1 ? ) , Component. RegexOutput == ( W , C1 ) {
926- assert ( count > 0 , " Must specify a positive count " )
926+ precondition ( count >= 0 , " Must specify a positive count " )
927927 let factory = makeFactory ( )
928928 self . init ( factory. exactly ( count, component ( ) ) )
929929 }
@@ -1039,7 +1039,7 @@ extension Repeat {
10391039 _ component: Component ,
10401040 count: Int
10411041 ) where RegexOutput == ( Substring , C1 ? , C2 ? ) , Component. RegexOutput == ( W , C1 , C2 ) {
1042- assert ( count > 0 , " Must specify a positive count " )
1042+ precondition ( count >= 0 , " Must specify a positive count " )
10431043 let factory = makeFactory ( )
10441044 self . init ( factory. exactly ( count, component) )
10451045 }
@@ -1049,7 +1049,7 @@ extension Repeat {
10491049 count: Int ,
10501050 @RegexComponentBuilder _ component: ( ) -> Component
10511051 ) where RegexOutput == ( Substring , C1 ? , C2 ? ) , Component. RegexOutput == ( W , C1 , C2 ) {
1052- assert ( count > 0 , " Must specify a positive count " )
1052+ precondition ( count >= 0 , " Must specify a positive count " )
10531053 let factory = makeFactory ( )
10541054 self . init ( factory. exactly ( count, component ( ) ) )
10551055 }
@@ -1165,7 +1165,7 @@ extension Repeat {
11651165 _ component: Component ,
11661166 count: Int
11671167 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 ) {
1168- assert ( count > 0 , " Must specify a positive count " )
1168+ precondition ( count >= 0 , " Must specify a positive count " )
11691169 let factory = makeFactory ( )
11701170 self . init ( factory. exactly ( count, component) )
11711171 }
@@ -1175,7 +1175,7 @@ extension Repeat {
11751175 count: Int ,
11761176 @RegexComponentBuilder _ component: ( ) -> Component
11771177 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 ) {
1178- assert ( count > 0 , " Must specify a positive count " )
1178+ precondition ( count >= 0 , " Must specify a positive count " )
11791179 let factory = makeFactory ( )
11801180 self . init ( factory. exactly ( count, component ( ) ) )
11811181 }
@@ -1291,7 +1291,7 @@ extension Repeat {
12911291 _ component: Component ,
12921292 count: Int
12931293 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 ) {
1294- assert ( count > 0 , " Must specify a positive count " )
1294+ precondition ( count >= 0 , " Must specify a positive count " )
12951295 let factory = makeFactory ( )
12961296 self . init ( factory. exactly ( count, component) )
12971297 }
@@ -1301,7 +1301,7 @@ extension Repeat {
13011301 count: Int ,
13021302 @RegexComponentBuilder _ component: ( ) -> Component
13031303 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 ) {
1304- assert ( count > 0 , " Must specify a positive count " )
1304+ precondition ( count >= 0 , " Must specify a positive count " )
13051305 let factory = makeFactory ( )
13061306 self . init ( factory. exactly ( count, component ( ) ) )
13071307 }
@@ -1417,7 +1417,7 @@ extension Repeat {
14171417 _ component: Component ,
14181418 count: Int
14191419 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 ) {
1420- assert ( count > 0 , " Must specify a positive count " )
1420+ precondition ( count >= 0 , " Must specify a positive count " )
14211421 let factory = makeFactory ( )
14221422 self . init ( factory. exactly ( count, component) )
14231423 }
@@ -1427,7 +1427,7 @@ extension Repeat {
14271427 count: Int ,
14281428 @RegexComponentBuilder _ component: ( ) -> Component
14291429 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 ) {
1430- assert ( count > 0 , " Must specify a positive count " )
1430+ precondition ( count >= 0 , " Must specify a positive count " )
14311431 let factory = makeFactory ( )
14321432 self . init ( factory. exactly ( count, component ( ) ) )
14331433 }
@@ -1543,7 +1543,7 @@ extension Repeat {
15431543 _ component: Component ,
15441544 count: Int
15451545 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 ) {
1546- assert ( count > 0 , " Must specify a positive count " )
1546+ precondition ( count >= 0 , " Must specify a positive count " )
15471547 let factory = makeFactory ( )
15481548 self . init ( factory. exactly ( count, component) )
15491549 }
@@ -1553,7 +1553,7 @@ extension Repeat {
15531553 count: Int ,
15541554 @RegexComponentBuilder _ component: ( ) -> Component
15551555 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 ) {
1556- assert ( count > 0 , " Must specify a positive count " )
1556+ precondition ( count >= 0 , " Must specify a positive count " )
15571557 let factory = makeFactory ( )
15581558 self . init ( factory. exactly ( count, component ( ) ) )
15591559 }
@@ -1669,7 +1669,7 @@ extension Repeat {
16691669 _ component: Component ,
16701670 count: Int
16711671 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? , C7 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 , C7 ) {
1672- assert ( count > 0 , " Must specify a positive count " )
1672+ precondition ( count >= 0 , " Must specify a positive count " )
16731673 let factory = makeFactory ( )
16741674 self . init ( factory. exactly ( count, component) )
16751675 }
@@ -1679,7 +1679,7 @@ extension Repeat {
16791679 count: Int ,
16801680 @RegexComponentBuilder _ component: ( ) -> Component
16811681 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? , C7 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 , C7 ) {
1682- assert ( count > 0 , " Must specify a positive count " )
1682+ precondition ( count >= 0 , " Must specify a positive count " )
16831683 let factory = makeFactory ( )
16841684 self . init ( factory. exactly ( count, component ( ) ) )
16851685 }
@@ -1795,7 +1795,7 @@ extension Repeat {
17951795 _ component: Component ,
17961796 count: Int
17971797 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? , C7 ? , C8 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 , C7 , C8 ) {
1798- assert ( count > 0 , " Must specify a positive count " )
1798+ precondition ( count >= 0 , " Must specify a positive count " )
17991799 let factory = makeFactory ( )
18001800 self . init ( factory. exactly ( count, component) )
18011801 }
@@ -1805,7 +1805,7 @@ extension Repeat {
18051805 count: Int ,
18061806 @RegexComponentBuilder _ component: ( ) -> Component
18071807 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? , C7 ? , C8 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 , C7 , C8 ) {
1808- assert ( count > 0 , " Must specify a positive count " )
1808+ precondition ( count >= 0 , " Must specify a positive count " )
18091809 let factory = makeFactory ( )
18101810 self . init ( factory. exactly ( count, component ( ) ) )
18111811 }
@@ -1921,7 +1921,7 @@ extension Repeat {
19211921 _ component: Component ,
19221922 count: Int
19231923 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? , C7 ? , C8 ? , C9 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 , C7 , C8 , C9 ) {
1924- assert ( count > 0 , " Must specify a positive count " )
1924+ precondition ( count >= 0 , " Must specify a positive count " )
19251925 let factory = makeFactory ( )
19261926 self . init ( factory. exactly ( count, component) )
19271927 }
@@ -1931,7 +1931,7 @@ extension Repeat {
19311931 count: Int ,
19321932 @RegexComponentBuilder _ component: ( ) -> Component
19331933 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? , C7 ? , C8 ? , C9 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 , C7 , C8 , C9 ) {
1934- assert ( count > 0 , " Must specify a positive count " )
1934+ precondition ( count >= 0 , " Must specify a positive count " )
19351935 let factory = makeFactory ( )
19361936 self . init ( factory. exactly ( count, component ( ) ) )
19371937 }
@@ -2047,7 +2047,7 @@ extension Repeat {
20472047 _ component: Component ,
20482048 count: Int
20492049 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? , C7 ? , C8 ? , C9 ? , C10 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 , C7 , C8 , C9 , C10 ) {
2050- assert ( count > 0 , " Must specify a positive count " )
2050+ precondition ( count >= 0 , " Must specify a positive count " )
20512051 let factory = makeFactory ( )
20522052 self . init ( factory. exactly ( count, component) )
20532053 }
@@ -2057,7 +2057,7 @@ extension Repeat {
20572057 count: Int ,
20582058 @RegexComponentBuilder _ component: ( ) -> Component
20592059 ) where RegexOutput == ( Substring , C1 ? , C2 ? , C3 ? , C4 ? , C5 ? , C6 ? , C7 ? , C8 ? , C9 ? , C10 ? ) , Component. RegexOutput == ( W , C1 , C2 , C3 , C4 , C5 , C6 , C7 , C8 , C9 , C10 ) {
2060- assert ( count > 0 , " Must specify a positive count " )
2060+ precondition ( count >= 0 , " Must specify a positive count " )
20612061 let factory = makeFactory ( )
20622062 self . init ( factory. exactly ( count, component ( ) ) )
20632063 }
0 commit comments