about summary refs log tree commit diff
path: root/src/libcore/str.rs
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-09-25 17:39:22 -0700
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-09-25 22:13:05 -0700
commite19e628b19af2921fc29818009496bc430640f76 (patch)
tree9e4d4d161b7de4b33cd4335dbe8355fa93bd8463 /src/libcore/str.rs
parent473a866733b085419b41b2d2f2708a49c079f89e (diff)
downloadrust-e19e628b19af2921fc29818009496bc430640f76.tar.gz
rust-e19e628b19af2921fc29818009496bc430640f76.zip
Demode iter-trait
Diffstat (limited to 'src/libcore/str.rs')
-rw-r--r--src/libcore/str.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index eaaf11dab5d..13fb2260045 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -377,7 +377,7 @@ fn unshift_char(s: &mut ~str, ch: char) {
 pure fn trim_left_chars(s: &str, chars_to_trim: &[char]) -> ~str {
     if chars_to_trim.is_empty() { return from_slice(s); }
 
-    match find(s, |c| !chars_to_trim.contains(c)) {
+    match find(s, |c| !chars_to_trim.contains(&c)) {
       None => ~"",
       Some(first) => unsafe { raw::slice_bytes(s, first, s.len()) }
     }
@@ -395,7 +395,7 @@ pure fn trim_left_chars(s: &str, chars_to_trim: &[char]) -> ~str {
 pure fn trim_right_chars(s: &str, chars_to_trim: &[char]) -> ~str {
     if chars_to_trim.is_empty() { return str::from_slice(s); }
 
-    match rfind(s, |c| !chars_to_trim.contains(c)) {
+    match rfind(s, |c| !chars_to_trim.contains(&c)) {
       None => ~"",
       Some(last) => {
         let {next, _} = char_range_at(s, last);