bump deps, fix clippy warnings
This commit is contained in:
@@ -21,9 +21,9 @@ tls = ["rustls", "webpki", "webpki-roots"]
|
|||||||
cookies = ["cookie"]
|
cookies = ["cookie"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.11"
|
base64 = "0.12"
|
||||||
chunked_transfer = "1"
|
chunked_transfer = "1"
|
||||||
cookie = { version = "0.12", features = ["percent-encode"], optional = true}
|
cookie = { version = "0.13", features = ["percent-encode"], optional = true}
|
||||||
lazy_static = "1"
|
lazy_static = "1"
|
||||||
qstring = "0.7"
|
qstring = "0.7"
|
||||||
url = "2"
|
url = "2"
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ impl Request {
|
|||||||
/// ```
|
/// ```
|
||||||
#[cfg(feature = "json")]
|
#[cfg(feature = "json")]
|
||||||
pub fn send_json(&mut self, data: SerdeValue) -> Response {
|
pub fn send_json(&mut self, data: SerdeValue) -> Response {
|
||||||
if let None = self.header("Content-Type") {
|
if self.header("Content-Type").is_none() {
|
||||||
self.set("Content-Type", "application/json");
|
self.set("Content-Type", "application/json");
|
||||||
}
|
}
|
||||||
self.do_call(Payload::JSON(data))
|
self.do_call(Payload::JSON(data))
|
||||||
|
|||||||
@@ -718,11 +718,9 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
#[cfg(feature = "json")]
|
#[cfg(feature = "json")]
|
||||||
fn parse_simple_json() {
|
fn parse_simple_json() {
|
||||||
let s = format!(
|
let s = "HTTP/1.1 200 OK\r\n\
|
||||||
"HTTP/1.1 200 OK\r\n\
|
|
||||||
\r\n\
|
\r\n\
|
||||||
{{\"hello\":\"world\"}}"
|
{\"hello\":\"world\"}";
|
||||||
);
|
|
||||||
let resp = s.parse::<Response>().unwrap();
|
let resp = s.parse::<Response>().unwrap();
|
||||||
let v = resp.into_json().unwrap();
|
let v = resp.into_json().unwrap();
|
||||||
let compare = "{\"hello\":\"world\"}"
|
let compare = "{\"hello\":\"world\"}"
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ fn read_https(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(deprecated)]
|
||||||
fn is_close_notify(e: &std::io::Error) -> bool {
|
fn is_close_notify(e: &std::io::Error) -> bool {
|
||||||
if e.kind() != std::io::ErrorKind::ConnectionAborted {
|
if e.kind() != std::io::ErrorKind::ConnectionAborted {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user