no let
This commit is contained in:
parent
6f1d367776
commit
daf6bed23a
10
src/main.rs
10
src/main.rs
@ -211,15 +211,17 @@ impl Web3ProxyState {
|
|||||||
let client = self.client.clone();
|
let client = self.client.clone();
|
||||||
let json_body = json_body.clone();
|
let json_body = json_body.clone();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
// TODO: there has to be a better way to do this map. i think maybe put the map outside this spawn?
|
// TODO: there has to be a better way to do this map and map_err
|
||||||
let resp = client
|
client
|
||||||
.post(&url)
|
.post(&url)
|
||||||
.json(&json_body)
|
.json(&json_body)
|
||||||
.send()
|
.send()
|
||||||
.await
|
.await
|
||||||
.map_err(|e| (url.clone(), e))?;
|
// add the url to the error so that we can decrement
|
||||||
resp.text()
|
.map_err(|e| (url.clone(), e))?
|
||||||
|
.text()
|
||||||
.await
|
.await
|
||||||
|
// add the url to the result and the error so that we can decrement
|
||||||
.map(|t| (url.clone(), t))
|
.map(|t| (url.clone(), t))
|
||||||
.map_err(|e| (url, e))
|
.map_err(|e| (url, e))
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user