🚨 Add license to Cargo.toml and fix up clippy stuff
parent
b673fa94c7
commit
063e79d217
|
@ -2,8 +2,10 @@
|
|||
|
||||
name = "ptth"
|
||||
version = "0.1.0"
|
||||
authors = ["_"]
|
||||
authors = ["Trish"]
|
||||
edition = "2018"
|
||||
license-file = "COPYING"
|
||||
license = "AGPL-3.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ async fn handle_all (req: Request <Body>, state: Arc <ServerState <'static>>)
|
|||
}
|
||||
|
||||
let body = ptth_resp.body
|
||||
.map (|b| Body::wrap_stream (b))
|
||||
.unwrap_or_else (|| Body::empty ())
|
||||
.map (Body::wrap_stream)
|
||||
.unwrap_or_else (Body::empty)
|
||||
;
|
||||
|
||||
let resp = resp.body (body).unwrap ();
|
||||
|
|
|
@ -247,10 +247,7 @@ pub async fn serve_all (
|
|||
}
|
||||
}
|
||||
|
||||
let should_send_body = match &parts.method {
|
||||
http_serde::Method::Get => true,
|
||||
_ => false,
|
||||
};
|
||||
let should_send_body = matches! (&parts.method, http_serde::Method::Get);
|
||||
|
||||
use percent_encoding::*;
|
||||
|
||||
|
|
|
@ -97,9 +97,7 @@ pub async fn main (opt: Opt) -> Result <(), Box <dyn Error>> {
|
|||
|
||||
let handlebars = handlebars.clone ();
|
||||
tokio::spawn (async move {
|
||||
match handle_req_resp (&opt, handlebars, &client, req_resp).await {
|
||||
_ => (),
|
||||
}
|
||||
handle_req_resp (&opt, handlebars, &client, req_resp).await;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue