about summary refs log tree commit diff
path: root/src/comp/util
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-24 22:13:16 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-27 15:54:43 -0700
commitb2408d57f034c0a448b60bf03254d8f73c0882db (patch)
tree91a357adc8eb380341861196f0782be05a1c3824 /src/comp/util
parentfcc031c5b4dc8f64c497b8dd1e066068e862bd72 (diff)
Convert portions of rustc to istrs. Recover a lot of performance.
Issue #855
Diffstat (limited to 'src/comp/util')
-rw-r--r--src/comp/util/ppaux.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/comp/util/ppaux.rs b/src/comp/util/ppaux.rs
index 610b1a54b62..259482bc9b3 100644
--- a/src/comp/util/ppaux.rs
+++ b/src/comp/util/ppaux.rs
@@ -147,13 +147,13 @@ fn ty_to_str(cx: &ctxt, typ: &t) -> str {
           ty_param(id, _) {
             "'" + str::unsafe_from_bytes([('a' as u8) + (id as u8)])
           }
-          _ { ty_to_short_str(cx, typ) }
+          _ { istr::to_estr(ty_to_short_str(cx, typ)) }
         }
 }
 
-fn ty_to_short_str(cx: &ctxt, typ: t) -> str {
+fn ty_to_short_str(cx: &ctxt, typ: t) -> istr {
     let s = encoder::encoded_ty(cx, typ);
-    if str::byte_len(s) >= 32u { s = str::substr(s, 0u, 32u); }
+    if istr::byte_len(s) >= 32u { s = istr::substr(s, 0u, 32u); }
     ret s;
 }