diff options
| author | Lehonti Ramos <17771375+Lehonti@users.noreply.github.com> | 2023-09-11 12:12:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-11 12:12:40 +0200 |
| commit | bc959270b762d1a6f68fc4f46a7c42138b39710c (patch) | |
| tree | 83ad06db60af1226a313423ea4bacc36a63e67a7 /src/Jellyfin.Extensions/StreamExtensions.cs | |
| parent | c79c59a32be47b9dde5360a6c56c02defd714d03 (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.Extensions/StreamExtensions.cs')
| -rw-r--r-- | src/Jellyfin.Extensions/StreamExtensions.cs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Jellyfin.Extensions/StreamExtensions.cs b/src/Jellyfin.Extensions/StreamExtensions.cs index d76558ded..182996852 100644 --- a/src/Jellyfin.Extensions/StreamExtensions.cs +++ b/src/Jellyfin.Extensions/StreamExtensions.cs @@ -26,10 +26,8 @@ namespace Jellyfin.Extensions /// <returns>All lines in the stream.</returns> public static string[] ReadAllLines(this Stream stream, Encoding encoding) { - using (StreamReader reader = new StreamReader(stream, encoding)) - { - return ReadAllLines(reader).ToArray(); - } + using StreamReader reader = new StreamReader(stream, encoding); + return ReadAllLines(reader).ToArray(); } /// <summary> |
