Removed nesting levels through block-scoped using statement (#10025)

Co-authored-by: John Doe <john@doe>
Co-authored-by: Lehonti Ramos <lehonti@ramos>
This commit is contained in:
Lehonti Ramos
2023-09-11 12:12:40 +02:00
committed by GitHub
parent c79c59a32b
commit bc959270b7
9 changed files with 83 additions and 102 deletions
+2 -4
View File
@@ -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 />