Skip to content

Commit

Permalink
ditch linq for exception
Browse files Browse the repository at this point in the history
  • Loading branch information
rhodosaur authored and AArnott committed Jun 21, 2021
1 parent 1f1cf8b commit 480626d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/NerdBank.GitVersioning/ManagedGit/ZLibStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Buffers;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

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

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

Expand Down

0 comments on commit 480626d

Please sign in to comment.