bump deps, fix clippy warnings
This commit is contained in:
@@ -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