From 2ade35bf1030e4eb4ccf7c02ceba04124669743c Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 8 Apr 2021 08:58:38 +0200 Subject: delete tree_builder, driver and serialize --- src/util/str.rs | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/util') diff --git a/src/util/str.rs b/src/util/str.rs index b2eb41a..c0f89f0 100644 --- a/src/util/str.rs +++ b/src/util/str.rs @@ -8,13 +8,6 @@ // except according to those terms. use mac::{_tt_as_expr_hack, matches}; -use std::fmt; - -pub fn to_escaped_string(x: &T) -> String { - // FIXME: don't allocate twice - let string = format!("{:?}", x); - string.chars().flat_map(|c| c.escape_default()).collect() -} /// If `c` is an ASCII letter, return the corresponding lowercase /// letter, otherwise None. @@ -31,12 +24,6 @@ pub fn is_ascii_alnum(c: char) -> bool { matches!(c, '0'..='9' | 'a'..='z' | 'A'..='Z') } -/// ASCII whitespace characters, as defined by -/// tree construction modes that treat them specially. -pub fn is_ascii_whitespace(c: char) -> bool { - matches!(c, '\t' | '\r' | '\n' | '\x0C' | ' ') -} - #[cfg(test)] #[allow(non_snake_case)] mod test { -- cgit v1.2.3