From d57d2b96d6fbb58af08d6abfa095634ccbc91bbf Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Fri, 13 Mar 2020 13:47:58 -0600 Subject: [PATCH] Revert "fix $VAR-names (#275) and properly print single control chars (#280)" This reverts commit d3eb31e4c36071029d596b5a177306a7e67ea62c. --- src/prolog/heap_print.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/prolog/heap_print.rs b/src/prolog/heap_print.rs index ea54de38..b65fbe5e 100644 --- a/src/prolog/heap_print.rs +++ b/src/prolog/heap_print.rs @@ -277,7 +277,7 @@ fn numbervar(n: Integer) -> Var { let i = n.mod_u(26) as usize; let j = n.div_rem_floor(Integer::from(26)); - let j = <(Integer, Integer)>::from(j).0; + let j = <(Integer, Integer)>::from(j).1; if j == 0 { CHAR_CODES[i].to_string() @@ -820,9 +820,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> { Constant::Char(c) => { let mut result = String::new(); - if c.is_control() { - result = c.to_string(); - } else if self.quoted { + if self.quoted { result.push('\''); result += &char_to_string(c); result.push('\''); -- 2.54.0