about summary refs log tree commit diff
path: root/src/libstd/str.rs
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-12-13 16:25:51 -0800
committerGraydon Hoare <graydon@mozilla.com>2011-12-13 16:34:50 -0800
commitfa9ad984fb2f013baebdbe01a42baa3b9101dd84 (patch)
tree49115690e45ca322337b93f25308cd618f85b013 /src/libstd/str.rs
parent32087f5c2a35bf8050067c22a57fd60269633a60 (diff)
Copy first batch of material from libstd to libcore.
Diffstat (limited to 'src/libstd/str.rs')
-rw-r--r--src/libstd/str.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs
index 7a9d3396c1b..fe2e7d9c567 100644
--- a/src/libstd/str.rs
+++ b/src/libstd/str.rs
@@ -938,15 +938,13 @@ Escapes a single character.
 */
 fn escape_char(c: char) -> str {
     alt c {
-        '"' { "\\\"" }
-        '\\' { "\\\\" }
-// TODO: uncomment these when https://github.com/graydon/rust/issues/1170 is
-// fixed.
-//        '\n' { "\\n" }
-//        '\t' { "\\t" }
-//        '\r' { "\\r" }
-        '\x00' to '\x1f' { #fmt["\\x%02x", c as uint] }
-        v { from_char(c) }
+      '"' { "\\\"" }
+      '\\' { "\\\\" }
+      '\n' { "\\n" }
+      '\t' { "\\t" }
+      '\r' { "\\r" }
+      '\x00' to '\x1f' { #fmt["\\x%02x", c as uint] }
+      v { from_char(c) }
     }
 }