From de35baadf360ef46813750b2c8ecdfeaae13bafa Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Sat, 5 Mar 2022 11:14:24 -0700 Subject: [PATCH] use must_be(chars) in read_from_chars/2 (#1305) --- src/lib/charsio.pl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/lib/charsio.pl b/src/lib/charsio.pl index 33e6e422..4ac7df2b 100644 --- a/src/lib/charsio.pl +++ b/src/lib/charsio.pl @@ -114,17 +114,7 @@ get_single_char(C) :- read_from_chars(Chars, Term) :- - ( var(Chars) -> - instantiation_error(read_from_chars/2) - ; nonvar(Term) -> - throw(error(uninstantiation_error(Term), read_from_chars/2)) - ; '$skip_max_list'(_, _, Chars, Chars0), - Chars0 == [], - partial_string(Chars) -> - true - ; - type_error(complete_string, Chars, read_from_chars/2) - ), + must_be(chars, Chars), '$read_term_from_chars'(Chars, Term). -- 2.54.0