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

Method next

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

Source from the content-addressed store, hash-verified

756}
757
758func (op *distinctOperator) next(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
759 key, err := op.apply(ctx, item.V)
760 if err != nil {
761 Error(err).SendContext(ctx, dst)
762 operatorOptions.stop()
763 return
764 }
765 _, ok := op.keyset[key]
766 if !ok {
767 item.SendContext(ctx, dst)
768 }
769 op.keyset[key] = nil
770}
771
772func (op *distinctOperator) err(ctx context.Context, item Item, dst chan<- Item, operatorOptions operatorOptions) {
773 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