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.
This commit is contained in:
Eman Resu 2026-05-26 13:22:43 -04:00
commit a017ab10eb

View file

@ -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: