private void PerformIteration()
            {
                if (!_enumerator.MoveNext())
                {
                    Current = _next != null
                        ? new EnumeratorValue <T>(_next.Value, _index++, true)
                        : EnumeratorValue <T> .Empty;

                    _next = null;
                    return;
                }

                if (_next == null)
                {
                    _next = new Container <T>((T)_enumerator.Current);
                    return;
                }

                Current     = new EnumeratorValue <T>(_next.Value, _index++, false);
                _next.Value = (T)_enumerator.Current;
            }
        private void PerformIteration()
        {
            if (!_enumerator.MoveNext())
            {
                Current = _hasNext
                    ? new EnumeratorValue <T>(_next, _index++, true)
                    : new EnumeratorValue <T>();

                _hasNext = false;
                _next    = default;
                return;
            }

            if (!_hasNext)
            {
                _hasNext = true;
                _next    = (T)_enumerator.Current;
                return;
            }

            Current = new EnumeratorValue <T>(_next, _index++, false);
            _next   = (T)_enumerator.Current;
        }