From 8a6f230f6c6f8a78bde34d4c8e26ce985ddb33b0 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Tue, 24 Sep 2024 11:28:32 -0700 Subject: [PATCH] updates Signed-off-by: Jess Frazelle --- kittycad/src/api_calls.rs | 40 +++++------ kittycad/src/api_tokens.rs | 16 ++--- kittycad/src/apps.rs | 12 ++-- kittycad/src/executor.rs | 4 +- kittycad/src/file.rs | 24 +++---- kittycad/src/hidden.rs | 20 +++--- kittycad/src/meta.rs | 32 ++++----- kittycad/src/ml.rs | 32 ++++----- kittycad/src/oauth2.rs | 32 ++++----- kittycad/src/orgs.rs | 76 ++++++++++---------- kittycad/src/payments.rs | 120 +++++++++++++++---------------- kittycad/src/service_accounts.rs | 16 ++--- kittycad/src/store.rs | 4 +- kittycad/src/unit.rs | 52 +++++++------- kittycad/src/users.rs | 52 +++++++------- openapitor/src/functions.rs | 2 +- 16 files changed, 267 insertions(+), 267 deletions(-) diff --git a/kittycad/src/api_calls.rs b/kittycad/src/api_calls.rs index 3d898f09..b93456c8 100644 --- a/kittycad/src/api_calls.rs +++ b/kittycad/src/api_calls.rs @@ -37,10 +37,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -83,10 +83,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -189,10 +189,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -240,10 +240,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -357,10 +357,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -403,10 +403,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -509,10 +509,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -555,10 +555,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -669,10 +669,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -720,10 +720,10 @@ impl ApiCalls { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } diff --git a/kittycad/src/api_tokens.rs b/kittycad/src/api_tokens.rs index 4ecf8143..2070f931 100644 --- a/kittycad/src/api_tokens.rs +++ b/kittycad/src/api_tokens.rs @@ -51,10 +51,10 @@ impl ApiTokens { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -165,10 +165,10 @@ impl ApiTokens { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -206,10 +206,10 @@ impl ApiTokens { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -241,10 +241,10 @@ impl ApiTokens { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/apps.rs b/kittycad/src/apps.rs index d72cbcdb..4db7e09f 100644 --- a/kittycad/src/apps.rs +++ b/kittycad/src/apps.rs @@ -37,10 +37,10 @@ impl Apps { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -73,10 +73,10 @@ impl Apps { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -98,10 +98,10 @@ impl Apps { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/executor.rs b/kittycad/src/executor.rs index 5c6bd775..afadb42d 100644 --- a/kittycad/src/executor.rs +++ b/kittycad/src/executor.rs @@ -59,10 +59,10 @@ impl Executor { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } diff --git a/kittycad/src/file.rs b/kittycad/src/file.rs index d4d42b70..200eaa75 100644 --- a/kittycad/src/file.rs +++ b/kittycad/src/file.rs @@ -44,10 +44,10 @@ impl File { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -100,10 +100,10 @@ impl File { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -170,10 +170,10 @@ impl File { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -218,10 +218,10 @@ impl File { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -274,10 +274,10 @@ impl File { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -330,10 +330,10 @@ impl File { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/hidden.rs b/kittycad/src/hidden.rs index 1ae0698c..9536468a 100644 --- a/kittycad/src/hidden.rs +++ b/kittycad/src/hidden.rs @@ -36,10 +36,10 @@ impl Hidden { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -71,10 +71,10 @@ impl Hidden { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -107,10 +107,10 @@ impl Hidden { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -144,10 +144,10 @@ impl Hidden { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -168,10 +168,10 @@ impl Hidden { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/meta.rs b/kittycad/src/meta.rs index 08d7ae80..9b0b90c3 100644 --- a/kittycad/src/meta.rs +++ b/kittycad/src/meta.rs @@ -35,10 +35,10 @@ impl Meta { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -69,10 +69,10 @@ impl Meta { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -101,10 +101,10 @@ impl Meta { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -147,10 +147,10 @@ impl Meta { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -183,10 +183,10 @@ impl Meta { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -226,10 +226,10 @@ impl Meta { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -256,10 +256,10 @@ impl Meta { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -288,10 +288,10 @@ impl Meta { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/ml.rs b/kittycad/src/ml.rs index 30a3f0a3..17dcae14 100644 --- a/kittycad/src/ml.rs +++ b/kittycad/src/ml.rs @@ -49,10 +49,10 @@ impl Ml { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -95,10 +95,10 @@ impl Ml { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -207,10 +207,10 @@ impl Ml { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -238,10 +238,10 @@ impl Ml { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -269,10 +269,10 @@ impl Ml { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -320,10 +320,10 @@ impl Ml { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -435,10 +435,10 @@ impl Ml { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -476,10 +476,10 @@ impl Ml { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/oauth2.rs b/kittycad/src/oauth2.rs index e7bcdec9..ba6512c5 100644 --- a/kittycad/src/oauth2.rs +++ b/kittycad/src/oauth2.rs @@ -38,10 +38,10 @@ impl Oauth2 { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -71,10 +71,10 @@ impl Oauth2 { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -96,10 +96,10 @@ impl Oauth2 { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -129,10 +129,10 @@ impl Oauth2 { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -180,10 +180,10 @@ impl Oauth2 { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -223,10 +223,10 @@ impl Oauth2 { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -274,10 +274,10 @@ impl Oauth2 { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -299,10 +299,10 @@ impl Oauth2 { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/orgs.rs b/kittycad/src/orgs.rs index e5bcb964..fd3cde6c 100644 --- a/kittycad/src/orgs.rs +++ b/kittycad/src/orgs.rs @@ -36,10 +36,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -67,10 +67,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -98,10 +98,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -124,10 +124,10 @@ impl Orgs { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -175,10 +175,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -290,10 +290,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -332,10 +332,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -368,10 +368,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -404,10 +404,10 @@ impl Orgs { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -439,10 +439,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -477,10 +477,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -510,10 +510,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -541,10 +541,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -572,10 +572,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -596,10 +596,10 @@ impl Orgs { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -642,10 +642,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -746,10 +746,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -791,10 +791,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -825,10 +825,10 @@ impl Orgs { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/payments.rs b/kittycad/src/payments.rs index 2260f8b6..adec8184 100644 --- a/kittycad/src/payments.rs +++ b/kittycad/src/payments.rs @@ -40,10 +40,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -87,10 +87,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -134,10 +134,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -162,10 +162,10 @@ impl Payments { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -197,10 +197,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -226,10 +226,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -255,10 +255,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -284,10 +284,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -318,10 +318,10 @@ impl Payments { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -347,10 +347,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -378,10 +378,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -409,10 +409,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -432,10 +432,10 @@ impl Payments { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -474,10 +474,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -510,10 +510,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -545,10 +545,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -592,10 +592,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -639,10 +639,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -667,10 +667,10 @@ impl Payments { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -696,10 +696,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -725,10 +725,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -754,10 +754,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -783,10 +783,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -811,10 +811,10 @@ impl Payments { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -840,10 +840,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -871,10 +871,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -902,10 +902,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -932,10 +932,10 @@ impl Payments { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -974,10 +974,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -1010,10 +1010,10 @@ impl Payments { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/service_accounts.rs b/kittycad/src/service_accounts.rs index 6411dd9b..6f522e43 100644 --- a/kittycad/src/service_accounts.rs +++ b/kittycad/src/service_accounts.rs @@ -51,10 +51,10 @@ impl ServiceAccounts { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -166,10 +166,10 @@ impl ServiceAccounts { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -207,10 +207,10 @@ impl ServiceAccounts { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -243,10 +243,10 @@ impl ServiceAccounts { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/store.rs b/kittycad/src/store.rs index 1255ca90..9a1d09e6 100644 --- a/kittycad/src/store.rs +++ b/kittycad/src/store.rs @@ -42,10 +42,10 @@ impl Store { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/unit.rs b/kittycad/src/unit.rs index 8a3662da..5e13afc7 100644 --- a/kittycad/src/unit.rs +++ b/kittycad/src/unit.rs @@ -55,10 +55,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -105,10 +105,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -145,10 +145,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -185,10 +185,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -235,10 +235,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -275,10 +275,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -325,10 +325,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -375,10 +375,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -425,10 +425,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -465,10 +465,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -505,10 +505,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -545,10 +545,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -595,10 +595,10 @@ impl Unit { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/kittycad/src/users.rs b/kittycad/src/users.rs index bb75e827..d8e42f3d 100644 --- a/kittycad/src/users.rs +++ b/kittycad/src/users.rs @@ -37,10 +37,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -68,10 +68,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -94,10 +94,10 @@ impl Users { Ok(()) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -123,10 +123,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -152,10 +152,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -186,10 +186,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -220,10 +220,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -258,10 +258,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -299,10 +299,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -345,10 +345,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -461,10 +461,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -575,10 +575,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } @@ -609,10 +609,10 @@ impl Users { }) } else { let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { + Err(crate::types::error::Error::Server { body: text.to_string(), status, - }); + }) } } } diff --git a/openapitor/src/functions.rs b/openapitor/src/functions.rs index 0b669ae3..f4f70496 100644 --- a/openapitor/src/functions.rs +++ b/openapitor/src/functions.rs @@ -1365,7 +1365,7 @@ fn get_function_body( } else { // Try to decode the error. let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server{body:text.to_string(), status}); + Err(crate::types::error::Error::Server{body:text.to_string(), status}) } }) }