Removed unnecessary Tokio thread spawn when processing a network request
This commit is contained in:
+2
-2
@@ -68,8 +68,8 @@ impl<'a, 'b> Network<'a, 'b> {
|
|||||||
self.cancellation_token = app.reset_cancellation_token();
|
self.cancellation_token = app.reset_cancellation_token();
|
||||||
app.is_loading = false;
|
app.is_loading = false;
|
||||||
}
|
}
|
||||||
resp = tokio::spawn(self.call_api(request_props).await.send()) => {
|
resp = self.call_api(request_props).await.send() => {
|
||||||
match resp.unwrap() {
|
match resp {
|
||||||
Ok(response) => {
|
Ok(response) => {
|
||||||
if response.status().is_success() {
|
if response.status().is_success() {
|
||||||
match method {
|
match method {
|
||||||
|
|||||||
Reference in New Issue
Block a user