about summary refs log tree commit diff
path: root/src/libcore/str.rs
diff options
context:
space:
mode:
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);