Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libcore/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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];

Expand Down