Update to Rust 2016-03-05

This commit is contained in:
Anthony Ramine 2016-03-06 02:37:48 +01:00
parent 64fb09ca2d
commit 7c1dd54895
13 changed files with 108 additions and 113 deletions

View file

@ -29,7 +29,7 @@ pub enum HeaderOrMethod {
impl HeaderOrMethod {
fn match_header(&self, header_name: &str) -> bool {
match *self {
HeaderOrMethod::HeaderData(ref s) => s.eq_ignore_ascii_case(header_name),
HeaderOrMethod::HeaderData(ref s) => (&**s).eq_ignore_ascii_case(header_name),
_ => false
}
}

View file

@ -51,7 +51,7 @@ fn establish_a_websocket_connection(resource_url: &Url, net_url: (Host, String,
{
let protocol_in_use = unwrap_websocket_protocol(response.protocol());
if let Some(protocol_name) = protocol_in_use {
if !protocols.is_empty() && !protocols.iter().any(|p| p.eq_ignore_ascii_case(protocol_name)) {
if !protocols.is_empty() && !protocols.iter().any(|p| (&**p).eq_ignore_ascii_case(protocol_name)) {
return Err(WebSocketError::ProtocolError("Protocol in Use not in client-supplied protocol list"));
};
};