From 706ab2ae5b02db1533330a297bd1b080e0a38fc5 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Sat, 3 Sep 2022 19:58:51 +0200 Subject: [PATCH] use newly available must_be(chars, ...) for better and shorter type test --- src/lib/crypto.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/crypto.pl b/src/lib/crypto.pl index 25b5ebb6..6473e0d1 100644 --- a/src/lib/crypto.pl +++ b/src/lib/crypto.pl @@ -65,8 +65,7 @@ hex_bytes(Hs, Bytes) :- ( ground(Hs) -> - must_be(list, Hs), - maplist(must_be(atom), Hs), + must_be(chars, Hs), ( phrase(hex_bytes(Hs), Bytes) -> true ; domain_error(hex_encoding, Hs, hex_bytes/2) -- 2.54.0