mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-11-15 17:02:03 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user