diff options
Diffstat (limited to 'UVtools.Core/Extensions/StreamExtensions.cs')
-rw-r--r-- | UVtools.Core/Extensions/StreamExtensions.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/UVtools.Core/Extensions/StreamExtensions.cs b/UVtools.Core/Extensions/StreamExtensions.cs index f85f917..c1404e0 100644 --- a/UVtools.Core/Extensions/StreamExtensions.cs +++ b/UVtools.Core/Extensions/StreamExtensions.cs @@ -19,11 +19,9 @@ namespace UVtools.Core.Extensions /// <returns>Byte array data</returns> public static byte[] ToArray(this Stream stream) { - using (var memoryStream = new MemoryStream()) - { - stream.CopyTo(memoryStream); - return memoryStream.ToArray(); - } + using var memoryStream = new MemoryStream(); + stream.CopyTo(memoryStream); + return memoryStream.ToArray(); } } } |