Skip to content

Commit d9d7b6a

Browse files
authored
Use correct ExceptionArgument value in System.IO.Pipelines (#105418)
1 parent 5aa4945 commit d9d7b6a

File tree

1 file changed

+2
-2
lines changed
  • src/libraries/System.IO.Pipelines/src/System/IO/Pipelines

1 file changed

+2
-2
lines changed

src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/Pipe.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ internal Memory<byte> GetMemory(int sizeHint)
132132

133133
if (sizeHint < 0)
134134
{
135-
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.minimumSize);
135+
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.sizeHint);
136136
}
137137

138138
AllocateWriteHeadIfNeeded(sizeHint);
@@ -149,7 +149,7 @@ internal Span<byte> GetSpan(int sizeHint)
149149

150150
if (sizeHint < 0)
151151
{
152-
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.minimumSize);
152+
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.sizeHint);
153153
}
154154

155155
AllocateWriteHeadIfNeeded(sizeHint);

0 commit comments

Comments
 (0)