Renamed 'unwrapAndSkip()' to 'unwrapAndFilter()'

This commit is contained in:
Daniil Borisovskii 2020-04-28 21:25:03 +03:00
parent 4e9e104124
commit 89ddc59ff8
2 changed files with 2 additions and 2 deletions

View File

@ -18,6 +18,6 @@ fun <T> Flowable<Optional<T>>.unwrapOrError(
?: Flowable.error(ShouldNotHappenException(errorMessage))
}
fun <T> Flowable<Optional<T>>.unwrapOrSkip(): Flowable<T> = this
fun <T> Flowable<Optional<T>>.unwrapOrFilter(): Flowable<T> = this
.filter { it.get() != null }
.map { it.get() }

View File

@ -18,6 +18,6 @@ fun <T> Observable<Optional<T>>.unwrapOrError(
?: Observable.error(ShouldNotHappenException(errorMessage))
}
fun <T> Observable<Optional<T>>.unwrapOrSkip(): Observable<T> = this
fun <T> Observable<Optional<T>>.unwrapOrFilter(): Observable<T> = this
.filter { it.get() != null }
.map { it.get() }