Merge pull request #292 from hyperium/rustup

fix(rustup): update FromStr
This commit is contained in:
Sean McArthur
2015-02-03 19:01:32 -08:00
18 changed files with 90 additions and 79 deletions

View File

@@ -359,7 +359,7 @@ impl<'a> fmt::Debug for HeaderView<'a> {
}
impl<'a> Extend<HeaderView<'a>> for Headers {
fn extend<I: Iterator<Item=HeaderView<'a>>>(&mut self, mut iter: I) {
fn extend<I: Iterator<Item=HeaderView<'a>>>(&mut self, iter: I) {
for header in iter {
self.data.insert((*header.0).clone(), (*header.1).clone());
}
@@ -581,7 +581,7 @@ mod tests {
}
// we JUST checked that raw.len() == 1, so raw[0] WILL exist.
match from_utf8(unsafe { &raw[].get_unchecked(0)[] }) {
Ok(s) => FromStr::from_str(s),
Ok(s) => FromStr::from_str(s).ok(),
Err(_) => None
}.map(|u| CrazyLength(Some(false), u))
}