From 8d3f05118ec27d16f36dcfadf16e411e72d03aca Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Wed, 10 Jun 2020 18:33:15 +0200 Subject: [PATCH] do not use "await using" --- src/ImageSharp/Formats/ImageDecoderUtilities.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/ImageDecoderUtilities.cs b/src/ImageSharp/Formats/ImageDecoderUtilities.cs index 933a571cc8..6bb9116cda 100644 --- a/src/ImageSharp/Formats/ImageDecoderUtilities.cs +++ b/src/ImageSharp/Formats/ImageDecoderUtilities.cs @@ -22,7 +22,7 @@ namespace SixLabors.ImageSharp.Formats return decoder.Identify(stream); } - await using MemoryStream ms = decoder.Configuration.MemoryAllocator.AllocateFixedCapacityMemoryStream(stream.Length); + using MemoryStream ms = decoder.Configuration.MemoryAllocator.AllocateFixedCapacityMemoryStream(stream.Length); await stream.CopyToAsync(ms).ConfigureAwait(false); ms.Position = 0; return decoder.Identify(ms); @@ -46,7 +46,7 @@ namespace SixLabors.ImageSharp.Formats return decoder.Decode(stream); } - await using MemoryStream ms = decoder.Configuration.MemoryAllocator.AllocateFixedCapacityMemoryStream(stream.Length); + using MemoryStream ms = decoder.Configuration.MemoryAllocator.AllocateFixedCapacityMemoryStream(stream.Length); await stream.CopyToAsync(ms).ConfigureAwait(false); ms.Position = 0; return decoder.Decode(ms);