-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
A-testsArea: tests.Area: tests.C-bugCategory: bug. Something is wrong. This is bad!Category: bug. Something is wrong. This is bad!
Description
This is blocking the Servo rustup. Code went from
let reason = match str::from_utf8(cursor.into_inner()) {
Ok(s) => s.trim(),
Err(_) => return Err(HttpStatusError)
};
let reason = match from_u16::<StatusCode>(code) {
Some(status) => match status.canonical_reason() {
Some(phrase) => {
if phrase == reason {
Borrowed(phrase)
} else {
Owned(reason.to_string())
}
}
_ => Owned(reason.to_string())
},
None => return Err(HttpStatusError)
};to
let code = res.code.unwrap();
let reason = match StatusCode::from_u16(code).canonical_reason() {
Some(reason) => Cow::Borrowed(reason),
None => Cow::Owned(res.reason.unwrap().to_owned())
};Metadata
Metadata
Assignees
Labels
A-testsArea: tests.Area: tests.C-bugCategory: bug. Something is wrong. This is bad!Category: bug. Something is wrong. This is bad!