Fix warnings in net.

This commit is contained in:
Ms2ger 2015-02-13 11:24:21 +01:00
parent 2ca59b3f5b
commit b25564440d
5 changed files with 20 additions and 14 deletions

View file

@ -100,7 +100,7 @@ impl Cookie {
request_path.chars().filter(|&c| c == '/').count() == 1 {
"/".to_owned()
} else if request_path.ends_with("/") {
request_path.slice_to(request_path.len()-1).to_owned()
request_path[..request_path.len() - 1].to_owned()
} else {
request_path.to_owned()
}