Skip to content

Commit 8707444

Browse files
committed
use startWithValues for Observer BindingTarget
1 parent f1cb6f3 commit 8707444

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Sources/UnidirectionalBinding.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,8 @@ extension Signal.Observer {
123123
(observer: Signal<Value, Error>.Observer, source: Source) -> Disposable?
124124
where Source.Value == Value
125125
{
126-
return source.producer.start { [weak observer] in
127-
switch $0 {
128-
case .value(let val):
129-
observer?.send(value: val)
130-
default: break
131-
}
126+
return source.producer.startWithValues { [weak observer] in
127+
observer?.send(value: $0)
132128
}
133129
}
134130
}

0 commit comments

Comments
 (0)