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:
Sebastian Thiel
2015-03-21 16:53:03 +01:00
parent 5d7be77e4a
commit f547080df5
3 changed files with 5 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ impl FromStr for EntityTag {
}
// The etag is weak if its first char is not a DQUOTE.
if slice.char_at(0) == '"' /* '"' */ {
if slice.chars().next().unwrap() == '"' /* '"' */ {
// No need to check if the last char is a DQUOTE,
// we already did that above.
if check_slice_validity(slice.slice_chars(1, length-1)) {