You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RxBlocking/BlockingObservable+Operators.swift
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ extension BlockingObservable {
22
22
///
23
23
/// - returns: All elements of sequence.
24
24
publicfunc toArray()throws->[E]{
25
-
letresults=convertToArray()
25
+
letresults=materializeResult()
26
26
returntryelementsOrThrow(results)
27
27
}
28
28
}
@@ -34,7 +34,7 @@ extension BlockingObservable {
34
34
///
35
35
/// - returns: First element of sequence. If sequence is empty `nil` is returned.
36
36
publicfunc first()throws->E?{
37
-
letresults=convertToArray(max:1)
37
+
letresults=materializeResult(max:1)
38
38
returntryelementsOrThrow(results).first
39
39
}
40
40
}
@@ -46,7 +46,7 @@ extension BlockingObservable {
46
46
///
47
47
/// - returns: Last element in the sequence. If sequence is empty `nil` is returned.
48
48
publicfunc last()throws->E?{
49
-
letresults=convertToArray()
49
+
letresults=materializeResult()
50
50
returntryelementsOrThrow(results).last
51
51
}
52
52
}
@@ -68,7 +68,7 @@ extension BlockingObservable {
68
68
/// - parameter predicate: A function to test each source element for a condition.
69
69
/// - returns: Returns the only element of an sequence that satisfies the condition in the predicate, and reports an error if there is not exactly one element in the sequence.
/// - returns: On completion, returns the list of elements in the sequence. On error, returns the list of elements up to that point, along with the error itself.
0 commit comments