aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/str.rs13
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 {