From 420a338fa3b554f88ed05c1a7555fc6715edaacc Mon Sep 17 00:00:00 2001 From: jasper-d Date: Fri, 6 Oct 2023 21:00:44 +0200 Subject: [PATCH] Remove unnecessary compare --- src/NATS.Client.Core/Internal/NuidWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NATS.Client.Core/Internal/NuidWriter.cs b/src/NATS.Client.Core/Internal/NuidWriter.cs index d233d3d17..5061c078a 100644 --- a/src/NATS.Client.Core/Internal/NuidWriter.cs +++ b/src/NATS.Client.Core/Internal/NuidWriter.cs @@ -42,7 +42,7 @@ public static bool TryWriteNuid(Span nuidBuffer) private static bool TryWriteNuidCore(Span buffer, Span prefix, ulong sequential) { - if ((uint)buffer.Length < NuidLength || prefix.Length != PrefixLength || (uint)prefix.Length > (uint)buffer.Length) + if ((uint)buffer.Length < NuidLength || prefix.Length != PrefixLength) { return false; }