Skip to content

Commit

Permalink
undeprecate to again
Browse files Browse the repository at this point in the history
  • Loading branch information
cornerman committed Nov 6, 2023
1 parent 453eb88 commit 29351ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion colibri/src/main/scala/colibri/Observable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ object Observable {
def unsafeSubscribe(sink2: Observer[A]): Cancelable = source.unsafeSubscribe(Observer.combine(sink, sink2))
}

@deprecated("Use via instead", "0.7.8")
def to(sink: Observer[A]): Observable[Unit] = via(sink).void

@deprecated("Use tap instead", "0.7.8")
Expand Down
5 changes: 3 additions & 2 deletions reactive/src/main/scala/colibri/reactive/Reactive.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ trait RxSourceSelf[+Self[+X] <: RxSource[X], +SelfSync[+X] <: RxSource[X], +A] {

final def map[B](f: A => B): SelfSync[B] = transformRxSync(_.map(f))
final def tap(f: A => Unit): SelfSync[A] = transformRxSync(_.tap(f))
final def void: SelfSync[Unit] = map(_ => ())
final def void: SelfSync[Unit] = map(_ => ())

final def collect[B](f: PartialFunction[A, B]): Self[B] = transformRx(_.collect(f))
final def mapEither[B](f: A => Either[Throwable, B]): Self[B] = transformRx(_.mapEither(f))
Expand All @@ -53,7 +53,8 @@ trait RxSourceSelf[+Self[+X] <: RxSource[X], +SelfSync[+X] <: RxSource[X], +A] {
final def asEffect[F[_]: RunEffect, B](value: F[B]): Self[B] = transformRx(_.asEffect(value))
final def asFuture[B](value: => Future[B]): Self[B] = transformRx(_.asFuture(value))

final def via(writer: RxWriter[A]): SelfSync[A] = transformRxSync(_.via(writer.observer))
final def via(writer: RxWriter[A]): SelfSync[A] = transformRxSync(_.via(writer.observer))
final def to(writer: RxWriter[A]): SelfSync[Unit] = transformRxSync(_.to(writer.observer))

final def switchMap[B](f: A => RxSource[B]): Self[B] = transformRx(_.switchMap(f andThen (_.observable)))
final def mergeMap[B](f: A => RxSource[B]): Self[B] = transformRx(_.mergeMap(f andThen (_.observable)))
Expand Down

0 comments on commit 29351ce

Please sign in to comment.