about summary refs log tree commit diff
path: root/src/libstd/sort.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sort.rs')
-rw-r--r--src/libstd/sort.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstd/sort.rs b/src/libstd/sort.rs
index db6efdf3f52..8be3e1e6a62 100644
--- a/src/libstd/sort.rs
+++ b/src/libstd/sort.rs
@@ -885,8 +885,12 @@ mod tests {
         // tjc: funny that we have to use parens
         fn ile(x: &(&'static str), y: &(&'static str)) -> bool
         {
-            let x = x.to_lower();
-            let y = y.to_lower();
+            // FIXME: 4318 Instead of to_str_ascii, could use
+            // to_str_consume to not do a unneccessary copy.
+            // (Actually, could just remove the to_str_* call, but needs an deriving(Ord) on
+            // Ascii)
+            let x = x.to_ascii().to_lower().to_str_ascii();
+            let y = y.to_ascii().to_lower().to_str_ascii();
             x <= y
         }