1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00
This commit is contained in:
Rob Ede
2021-01-04 01:01:35 +00:00
parent 21f6c9d7a5
commit 2d4a174420
20 changed files with 40 additions and 40 deletions

View File

@ -176,7 +176,7 @@ mod _original {
buf[5] = b'0';
buf[7] = b'9';
}
_ => {},
_ => {}
}
let mut curr: isize = 12;

View File

@ -72,7 +72,7 @@ where
// send request body
match body.size() {
BodySize::None | BodySize::Empty | BodySize::Sized(0) => {},
BodySize::None | BodySize::Empty | BodySize::Sized(0) => {}
_ => send_body(body, Pin::new(&mut framed_inner)).await?,
};

View File

@ -89,7 +89,7 @@ where
CONNECTION | TRANSFER_ENCODING => continue, // http2 specific
CONTENT_LENGTH if skip_len => continue,
// DATE => has_date = true,
_ => {},
_ => {}
}
req.headers_mut().append(key, value.clone());
}

View File

@ -334,7 +334,7 @@ where
let mut read_buf = ReadBuf::new(&mut buf);
if let ConnectionType::H1(ref mut s) = io {
match Pin::new(s).poll_read(cx, &mut read_buf) {
Poll::Pending => {},
Poll::Pending => {}
Poll::Ready(Ok(())) if !read_buf.filled().is_empty() => {
if let Some(timeout) = self.config.disconnect_timeout {
if let ConnectionType::H1(io) = io {

View File

@ -137,7 +137,7 @@ pub(crate) trait MessageType: Sized {
expect = true;
}
}
_ => {},
_ => {}
}
headers.append(name, value);
@ -685,7 +685,7 @@ mod tests {
match MessageDecoder::<Request>::default().decode($e) {
Err(err) => match err {
ParseError::Io(_) => unreachable!("Parse error expected"),
_ => {},
_ => {}
},
_ => unreachable!("Error expected"),
}

View File

@ -736,7 +736,7 @@ where
let _ = this.ka_timer.as_mut().as_pin_mut().unwrap().poll(cx);
}
}
Poll::Pending => {},
Poll::Pending => {}
}
Ok(())

View File

@ -118,7 +118,7 @@ pub(crate) trait MessageType: Sized {
dst.put_slice(b"connection: close\r\n")
}
}
_ => {},
_ => {}
}
// merging headers from head and extra headers. HeaderMap::new() does not allocate.
@ -148,7 +148,7 @@ pub(crate) trait MessageType: Sized {
CONNECTION => continue,
TRANSFER_ENCODING | CONTENT_LENGTH if skip_len => continue,
DATE => has_date = true,
_ => {},
_ => {}
}
let k = key.as_str().as_bytes();

View File

@ -184,7 +184,7 @@ impl Encoder<Message> for Codec {
}
}
},
Message::Nop => {},
Message::Nop => {}
}
Ok(())
}

View File

@ -125,7 +125,7 @@ impl Parser {
debug!("Received close frame with payload length exceeding 125. Morphing to protocol close frame.");
return Ok(Some((true, OpCode::Close, None)));
}
_ => {},
_ => {}
}
// unmask

View File

@ -222,7 +222,7 @@ mod test {
macro_rules! opcode_into {
($from:expr => $opcode:pat) => {
match OpCode::from($from) {
e @ $opcode => {},
e @ $opcode => {}
e => unreachable!("{:?}", e),
}
};
@ -232,7 +232,7 @@ mod test {
($from:expr => $opcode:pat) => {
let res: u8 = $from.into();
match res {
e @ $opcode => {},
e @ $opcode => {}
e => unreachable!("{:?}", e),
}
};