mirror of
https://github.com/actix/actix-web.git
synced 2024-12-21 07:36:43 +00:00
clippy
This commit is contained in:
parent
edd9f14752
commit
4442535a45
3 changed files with 8 additions and 6 deletions
|
@ -1213,8 +1213,9 @@ mod tests {
|
|||
#[test]
|
||||
fn test_parse_chunked_payload_chunk_extension() {
|
||||
let mut buf = BytesMut::from(
|
||||
&"GET /test HTTP/1.1\r\n\
|
||||
transfer-encoding: chunked\r\n\r\n"[..],
|
||||
"GET /test HTTP/1.1\r\n\
|
||||
transfer-encoding: chunked\r\n\
|
||||
\r\n",
|
||||
);
|
||||
|
||||
let mut reader = MessageDecoder::<Request>::default();
|
||||
|
@ -1233,7 +1234,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_response_http10_read_until_eof() {
|
||||
let mut buf = BytesMut::from(&"HTTP/1.0 200 Ok\r\n\r\ntest data"[..]);
|
||||
let mut buf = BytesMut::from("HTTP/1.0 200 Ok\r\n\r\ntest data");
|
||||
|
||||
let mut reader = MessageDecoder::<ResponseHead>::default();
|
||||
let (_msg, pl) = reader.decode(&mut buf).unwrap().unwrap();
|
||||
|
|
|
@ -70,6 +70,7 @@ macro_rules! downcast {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#![allow(clippy::upper_case_acronyms)]
|
||||
|
||||
trait MB {
|
||||
downcast_get_type_id!();
|
||||
|
|
|
@ -380,7 +380,7 @@ impl Format {
|
|||
results.push(match cap.get(3).unwrap().as_str() {
|
||||
"a" => {
|
||||
if key.as_str() == "r" {
|
||||
FormatText::RealIPRemoteAddr
|
||||
FormatText::RealIpRemoteAddr
|
||||
} else {
|
||||
unreachable!()
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ enum FormatText {
|
|||
Time,
|
||||
TimeMillis,
|
||||
RemoteAddr,
|
||||
RealIPRemoteAddr,
|
||||
RealIpRemoteAddr,
|
||||
UrlPath,
|
||||
RequestHeader(HeaderName),
|
||||
ResponseHeader(HeaderName),
|
||||
|
@ -554,7 +554,7 @@ impl FormatText {
|
|||
};
|
||||
*self = s;
|
||||
}
|
||||
FormatText::RealIPRemoteAddr => {
|
||||
FormatText::RealIpRemoteAddr => {
|
||||
let s = if let Some(remote) = req.connection_info().realip_remote_addr() {
|
||||
FormatText::Str(remote.to_string())
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue