MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / next

Method next

observable_operator.go:806–817  ·  view source on GitHub ↗
(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions)

Source from the content-addressed store, hash-verified

804}
805
806func (op *distinctUntilChangedOperator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
807 key, err := op.apply(ctx, item.V)
808 if err != nil {
809 Error(err).SendContext(ctx, dst)
810 operatorOptions.stop()
811 return
812 }
813 if op.current != key {
814 item.SendContext(ctx, dst)
815 op.current = key
816 }
817}
818
819func (op *distinctUntilChangedOperator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
820 defaultErrorFuncOperator(ctx, item, dst, operatorOptions)

Callers

nothing calls this directly

Calls 3

ErrorFunction · 0.85
SendContextMethod · 0.80
applyMethod · 0.65

Tested by

no test coverage detected