From a017ab10eb0ecdd676280bc4c89c0e94850eee16 Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Tue, 26 May 2026 13:22:43 -0400 Subject: [PATCH] lib.network: remove assertMsg usage assertMsg sends our error message through a function call, even if the error condition doesn't trigger. This requires a lot of thunk allocation that can be easily avoided. --- lib/network/internal.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/network/internal.nix b/lib/network/internal.nix index adda711444fd..d22b2739c3f4 100644 --- a/lib/network/internal.nix +++ b/lib/network/internal.nix @@ -104,9 +104,9 @@ let */ parseExpandedIpv6 = addr: - assert lib.assertMsg ( + assert length addr == ipv6Pieces - ) "parseExpandedIpv6: expected list of integers with ${ipv6Pieces} elements"; + || throw "parseExpandedIpv6: expected list of integers with ${ipv6Pieces} elements"; let u16FromHexStr = hex: