diff options
author | Martin Fischer <martin@push-f.com> | 2021-04-08 08:58:38 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-04-08 15:40:48 +0200 |
commit | 2ade35bf1030e4eb4ccf7c02ceba04124669743c (patch) | |
tree | f6c17f8fbe39be1e79271a0ca08fbfb07c0f2a03 /src/util/str.rs | |
parent | 4231388b1fd99b7dbda4dd5885d858aa251513d5 (diff) |
delete tree_builder, driver and serialize
Diffstat (limited to 'src/util/str.rs')
-rw-r--r-- | src/util/str.rs | 13 |
1 files changed, 0 insertions, 13 deletions
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<T: fmt::Debug>(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 { |