From bc959270b762d1a6f68fc4f46a7c42138b39710c Mon Sep 17 00:00:00 2001 From: Lehonti Ramos <17771375+Lehonti@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:12:40 +0200 Subject: Removed nesting levels through block-scoped `using` statement (#10025) Co-authored-by: John Doe Co-authored-by: Lehonti Ramos --- src/Jellyfin.Drawing/ImageProcessor.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Jellyfin.Drawing/ImageProcessor.cs') diff --git a/src/Jellyfin.Drawing/ImageProcessor.cs b/src/Jellyfin.Drawing/ImageProcessor.cs index 44e06bb52..4f16e294b 100644 --- a/src/Jellyfin.Drawing/ImageProcessor.cs +++ b/src/Jellyfin.Drawing/ImageProcessor.cs @@ -111,10 +111,8 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable public async Task ProcessImage(ImageProcessingOptions options, Stream toStream) { var file = await ProcessImage(options).ConfigureAwait(false); - using (var fileStream = AsyncFile.OpenRead(file.Path)) - { - await fileStream.CopyToAsync(toStream).ConfigureAwait(false); - } + using var fileStream = AsyncFile.OpenRead(file.Path); + await fileStream.CopyToAsync(toStream).ConfigureAwait(false); } /// -- cgit v1.2.3