fix(rustup): 1.0.0-nightly (e2fa53e59 2015-03-20)
* replace `char_at()` calls with itertor, as suggested by compiler * fixed comparison in test
This commit is contained in:
@@ -28,7 +28,9 @@ impl Header for Host {
|
||||
// https://github.com/servo/rust-url/issues/42
|
||||
let idx = {
|
||||
let slice = &s[..];
|
||||
if slice.char_at(1) == '[' {
|
||||
let mut chars = slice.chars();
|
||||
chars.next();
|
||||
if chars.next().unwrap() == '[' {
|
||||
match slice.rfind(']') {
|
||||
Some(idx) => {
|
||||
if slice.len() > idx + 2 {
|
||||
|
||||
Reference in New Issue
Block a user