aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Drawing/ImageProcessor.cs
diff options
context:
space:
mode:
authorLehonti Ramos <17771375+Lehonti@users.noreply.github.com>2023-09-11 12:12:40 +0200
committerGitHub <noreply@github.com>2023-09-11 12:12:40 +0200
commitbc959270b762d1a6f68fc4f46a7c42138b39710c (patch)
tree83ad06db60af1226a313423ea4bacc36a63e67a7 /src/Jellyfin.Drawing/ImageProcessor.cs
parentc79c59a32be47b9dde5360a6c56c02defd714d03 (diff)
Removed nesting levels through block-scoped `using` statement (#10025)
Co-authored-by: John Doe <john@doe> Co-authored-by: Lehonti Ramos <lehonti@ramos>
Diffstat (limited to 'src/Jellyfin.Drawing/ImageProcessor.cs')
-rw-r--r--src/Jellyfin.Drawing/ImageProcessor.cs6
1 files changed, 2 insertions, 4 deletions
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);
}
/// <inheritdoc />