Skip to content

Commit 1a0846b

Browse files
committed
Make Path.if rethrows
1 parent 62032eb commit 1a0846b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/SwiftCrossUI/Path.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,13 @@ extension Path {
361361
@inlinable
362362
public consuming func `if`(
363363
_ condition: Bool,
364-
then ifTrue: (consuming Path) -> Path,
365-
else ifFalse: (consuming Path) -> Path = { $0 }
366-
) -> Path {
364+
then ifTrue: (consuming Path) throws -> Path,
365+
else ifFalse: (consuming Path) throws -> Path = { $0 }
366+
) rethrows -> Path {
367367
if condition {
368-
ifTrue(self)
368+
try ifTrue(self)
369369
} else {
370-
ifFalse(self)
370+
try ifFalse(self)
371371
}
372372
}
373373
}

0 commit comments

Comments
 (0)