about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-03-22 06:21:51 -0700
committerbors <bors@rust-lang.org>2013-03-22 06:21:51 -0700
commitd700500d0cc506f34dccdb8379cc1102becfd24f (patch)
tree4568d7aef101da7f7177dd9f6bcc989042bcd257 /src
parent059764779c7389bcea118d4c43cc243d185ec243 (diff)
parent557b8cce8e5dc12b868ae32f8969464cd38105ae (diff)
downloadrust-d700500d0cc506f34dccdb8379cc1102becfd24f.tar.gz
rust-d700500d0cc506f34dccdb8379cc1102becfd24f.zip
auto merge of #5471 : erickt/rust/incoming, r=bstrie
I made a typo in `str::levdistance` in my str pull request. This fixes it.
Diffstat (limited to 'src')
-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 980e984f75b..9626ebc65c8 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -599,7 +599,7 @@ pub pure fn split_str_nonempty(s: &'a str, sep: &'b str) -> ~[~str] {
 pub fn levdistance(s: &str, t: &str) -> uint {
 
     let slen = s.len();
-    let tlen = s.len();
+    let tlen = t.len();
 
     if slen == 0 { return tlen; }
     if tlen == 0 { return slen; }
@@ -611,7 +611,7 @@ pub fn levdistance(s: &str, t: &str) -> uint {
         let mut current = i;
         dcol[0] = current + 1;
 
-        for s.each_chari |j, tc| {
+        for t.each_chari |j, tc| {
 
             let mut next = dcol[j + 1];