Skip to content

Commit f92c2c0

Browse files
committed
Organize code.
1 parent aaebbf9 commit f92c2c0

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

SwiftTask/SwiftTask.swift

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ public enum TaskState: String, Printable
1414
case Fulfilled = "Fulfilled"
1515
case Rejected = "Rejected"
1616
case Cancelled = "Cancelled"
17-
case Any = "Any"
18-
19-
20-
public init(nilLiteral: Void)
21-
{
22-
self = Any
23-
}
2417

2518
public var description: String
2619
{
@@ -545,14 +538,14 @@ internal func _bindInnerTask<Progress2, Value2, Error>(
545538
)
546539
{
547540
switch innerTask.state {
548-
case .Fulfilled:
549-
fulfill(innerTask.value!)
550-
return
551-
case .Rejected, .Cancelled:
552-
_reject(innerTask.errorInfo!)
553-
return
554-
default:
555-
break
541+
case .Fulfilled:
542+
fulfill(innerTask.value!)
543+
return
544+
case .Rejected, .Cancelled:
545+
_reject(innerTask.errorInfo!)
546+
return
547+
default:
548+
break
556549
}
557550

558551
innerTask.progress { _, progressValue in
@@ -579,6 +572,8 @@ internal func _bindInnerTask<Progress2, Value2, Error>(
579572
}
580573
}
581574

575+
// MARK: - Multiple Tasks
576+
582577
extension Task
583578
{
584579
public typealias BulkProgress = (completedCount: Int, totalCount: Int)

0 commit comments

Comments
 (0)