File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public struct DisposeBag: ~Copyable {
38
38
/// Adds `disposable` to be disposed when dispose bag is being deinited.
39
39
///
40
40
/// - parameter disposable: Disposable to add.
41
- public /* mutating*/ func insert( _ disposable: Disposable ) {
41
+ public mutating func insert( _ disposable: Disposable ) {
42
42
implementation. _insert ( disposable) ? . dispose ( )
43
43
}
44
44
}
@@ -116,17 +116,17 @@ extension DisposeBag {
116
116
}
117
117
118
118
/// Convenience function allows a list of disposables to be gathered for disposal.
119
- public func insert( _ disposables: Disposable ... ) {
119
+ public mutating func insert( _ disposables: Disposable ... ) {
120
120
self . insert ( disposables)
121
121
}
122
122
123
123
/// Convenience function allows a list of disposables to be gathered for disposal.
124
- public func insert( @DisposableBuilder builder: ( ) -> [ Disposable ] ) {
124
+ public mutating func insert( @DisposableBuilder builder: ( ) -> [ Disposable ] ) {
125
125
self . insert ( builder ( ) )
126
126
}
127
127
128
128
/// Convenience function allows an array of disposables to be gathered for disposal.
129
- public func insert( _ disposables: [ Disposable ] ) {
129
+ public mutating func insert( _ disposables: [ Disposable ] ) {
130
130
self . implementation. lock. performLocked {
131
131
if self . implementation. isDisposed {
132
132
disposables. forEach { $0. dispose ( ) }
You can’t perform that action at this time.
0 commit comments