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