mirror of
https://github.com/kristoferssolo/transmission-rpc.git
synced 2025-10-21 20:10:37 +00:00
cargo fmt
This commit is contained in:
parent
196c487b7c
commit
4054fac63b
12
src/lib.rs
12
src/lib.rs
@ -591,12 +591,12 @@ impl TransClient {
|
|||||||
|
|
||||||
let rsp: reqwest::Response = rq.send().await?;
|
let rsp: reqwest::Response = rq.send().await?;
|
||||||
if matches!(rsp.status(), StatusCode::CONFLICT) {
|
if matches!(rsp.status(), StatusCode::CONFLICT) {
|
||||||
let session_id = rsp
|
let session_id = rsp
|
||||||
.headers()
|
.headers()
|
||||||
.get("X-Transmission-Session-Id")
|
.get("X-Transmission-Session-Id")
|
||||||
.ok_or(TransError::NoSessionIdReceived)?
|
.ok_or(TransError::NoSessionIdReceived)?
|
||||||
.to_str()?;
|
.to_str()?;
|
||||||
self.session_id = Some(String::from(session_id));
|
self.session_id = Some(String::from(session_id));
|
||||||
|
|
||||||
info!("Got new session_id: {}. Retrying request.", session_id);
|
info!("Got new session_id: {}. Retrying request.", session_id);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user