Skip to content

Commit 480626d

Browse files
rhodosaurAArnott
authored andcommitted
ditch linq for exception
1 parent 1f1cf8b commit 480626d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/NerdBank.GitVersioning/ManagedGit/ZLibStream.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Buffers;
66
using System.IO;
77
using System.IO.Compression;
8-
using System.Linq;
98
using System.Threading;
109
using System.Threading.Tasks;
1110

@@ -59,7 +58,7 @@ public ZLibStream(Stream stream, long length = -1)
5958

6059
if (zlibHeader[0] != 0x78 || (zlibHeader[1] != 0x01 && zlibHeader[1] != 0x9C && zlibHeader[1] != 0x5E && zlibHeader[1] != 0xDA))
6160
{
62-
throw new GitException($"Invalid zlib header {string.Join(" ", zlibHeader.ToArray().Select(b => $"{b:X2}"))}");
61+
throw new GitException($"Invalid zlib header {zlibHeader[0]:X2} {zlibHeader[1]:X2}");
6362
}
6463
}
6564

0 commit comments

Comments
 (0)