Skip to content

Commit 4600e42

Browse files
committed
Fixed nullability warning due to missing annotation
1 parent ae0e4c1 commit 4600e42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Microsoft.Toolkit.HighPerformance/Extensions/IBufferWriterExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static Stream AsStream(this IBufferWriter<byte> writer)
3333
{
3434
// If the input writer is of type ArrayPoolBufferWriter<byte>, we can use the type
3535
// specific buffer writer owner to let the JIT elide callvirts when accessing it.
36-
var internalWriter = Unsafe.As<ArrayPoolBufferWriter<byte>>(writer);
36+
var internalWriter = Unsafe.As<ArrayPoolBufferWriter<byte>>(writer)!;
3737

3838
return new IBufferWriterStream<ArrayBufferWriterOwner>(new ArrayBufferWriterOwner(internalWriter));
3939
}

0 commit comments

Comments
 (0)