Fix net48 test build: use plain using for types without DisposeAsync

AsyncOnlyStream and EntryStream have no DisposeAsync on net48, so
await using fails to compile for that target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Adam Hathcock
2026-10-09 14:41:59 +01:00
parent b047d6860a
commit 830c816269
2 changed files with 2 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ public class GZipExtraFieldTests
)
{
using var rawInput = new MemoryStream(CreateGZipWithExtraField(extraLength));
await using var input = new AsyncOnlyStream(rawInput, disposeStream: false);
using var input = new AsyncOnlyStream(rawInput, disposeStream: false);
await using var gzip = new SharpCompress.Compressors.Deflate.GZipStream(
input,
SharpCompressionMode.Decompress

View File

@@ -125,7 +125,7 @@ public class RarEncryptedHeaderScanTests : TestBase
while (await reader.MoveToNextEntryAsync(CancellationToken.None))
{
Assert.Equal($"f{count:D3}.txt", reader.Entry.Key);
await using var entryStream = await reader.OpenEntryStreamAsync(CancellationToken.None);
using var entryStream = await reader.OpenEntryStreamAsync(CancellationToken.None);
using var textReader = new StreamReader(entryStream);
Assert.Equal(
"Solid encrypted header regression test.\n",