fix(rustup): unchecked_get

Closes #219
Closes #222
This commit is contained in:
Sean McArthur
2015-01-02 13:25:41 -08:00
parent 5dd4529165
commit 2251b3b918

View File

@@ -573,7 +573,7 @@ mod tests {
return None;
}
// we JUST checked that raw.len() == 1, so raw[0] WILL exist.
match from_utf8(unsafe { raw.as_slice().unsafe_get(0).as_slice() }) {
match from_utf8(unsafe { raw[].get_unchecked(0)[] }) {
Ok(s) => FromStr::from_str(s),
Err(_) => None
}.map(|u| CrazyLength(Some(false), u))