Skip to content

Commit 3f2daac

Browse files
authored
Merge pull request #28 from sibljon/patch-1
Add the @discardableResult attribute to a Disposable.add overload
2 parents 4b62dbb + 2e3effb commit 3f2daac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/Disposable.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ public final class CompositeDisposable: Disposable {
185185
///
186186
/// - returns: An instance of `DisposableHandle` that can be used to
187187
/// opaquely remove the disposable later (if desired).
188+
@discardableResult
188189
public func add(_ action: @escaping () -> Void) -> DisposableHandle {
189190
return add(ActionDisposable(action: action))
190191
}

0 commit comments

Comments
 (0)