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

@ -523,7 +523,7 @@ impl ClientRequest {
return Err(InvalidUrl::MissingScheme.into());
} else if let Some(scheme) = uri.scheme() {
match scheme.as_str() {
"http" | "ws" | "https" | "wss" => {},
"http" | "ws" | "https" | "wss" => {}
_ => return Err(InvalidUrl::UnknownScheme.into()),
}
} else {

View File

@ -370,14 +370,14 @@ mod tests {
async fn test_body() {
let mut req = TestResponse::with_header(header::CONTENT_LENGTH, "xxxx").finish();
match req.body().await.err().unwrap() {
PayloadError::UnknownLength => {},
PayloadError::UnknownLength => {}
_ => unreachable!("error"),
}
let mut req =
TestResponse::with_header(header::CONTENT_LENGTH, "1000000").finish();
match req.body().await.err().unwrap() {
PayloadError::Overflow => {},
PayloadError::Overflow => {}
_ => unreachable!("error"),
}
@ -390,7 +390,7 @@ mod tests {
.set_payload(Bytes::from_static(b"11111111111111"))
.finish();
match req.body().limit(5).await.err().unwrap() {
PayloadError::Overflow => {},
PayloadError::Overflow => {}
_ => unreachable!("error"),
}
}

View File

@ -86,7 +86,7 @@ impl Future for SendClientRequest {
SendClientRequest::Fut(send, delay, response_decompress) => {
if delay.is_some() {
match Pin::new(delay.as_mut().unwrap()).poll(cx) {
Poll::Pending => {},
Poll::Pending => {}
_ => return Poll::Ready(Err(SendRequestError::Timeout)),
}
}
@ -127,7 +127,7 @@ impl Future for SendClientRequest {
SendClientRequest::Fut(send, delay, _) => {
if delay.is_some() {
match Pin::new(delay.as_mut().unwrap()).poll(cx) {
Poll::Pending => {},
Poll::Pending => {}
_ => return Poll::Ready(Err(SendRequestError::Timeout)),
}
}

View File

@ -259,7 +259,7 @@ impl WebsocketsRequest {
return Err(InvalidUrl::MissingScheme.into());
} else if let Some(scheme) = uri.scheme() {
match scheme.as_str() {
"http" | "ws" | "https" | "wss" => {},
"http" | "ws" | "https" | "wss" => {}
_ => return Err(InvalidUrl::UnknownScheme.into()),
}
} else {

View File

@ -127,7 +127,7 @@ async fn test_timeout() {
let request = client.get(srv.url("/")).send();
match request.await {
Err(SendRequestError::Timeout) => {},
Err(SendRequestError::Timeout) => {}
_ => panic!(),
}
}
@ -149,7 +149,7 @@ async fn test_timeout_override() {
.timeout(Duration::from_millis(50))
.send();
match request.await {
Err(SendRequestError::Timeout) => {},
Err(SendRequestError::Timeout) => {}
_ => panic!(),
}
}