ThrowHelper.ThrowObjectDisposedException_ArrayMemoryPoolBuffer();
}
- return new Memory<T>(array!); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
+ return new Memory<T>(array);
}
}
if (nextSegment == null)
ThrowHelper.ThrowInvalidOperationException_EndPositionNotReached();
- next = new SequencePosition(nextSegment!, 0); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
+ next = new SequencePosition(nextSegment, 0);
memory = startSegment.Memory.Slice(startIndex);
}
else
if (array == null)
ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- _startObject = array!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
- _endObject = array!; // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
+ _startObject = array;
+ _endObject = array;
_startInteger = ReadOnlySequence.ArrayToSequenceStart(0);
_endInteger = ReadOnlySequence.ArrayToSequenceEnd(array!.Length); // TODO-NULLABLE: Remove ! when [DoesNotReturn] respected
}