From 99f62d090b686b79565b95ce34ad227514639e7b Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 16 Aug 2024 17:22:28 -0700 Subject: [PATCH] cloud: change error names --- rbx_asset/src/cloud.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rbx_asset/src/cloud.rs b/rbx_asset/src/cloud.rs index 15e79e7..348ad53 100644 --- a/rbx_asset/src/cloud.rs +++ b/rbx_asset/src/cloud.rs @@ -15,8 +15,8 @@ pub struct CreateAssetRequest{ } #[derive(Debug)] pub enum CreateError{ - ParseError(url::ParseError), - SerializeError(serde_json::Error), + Parse(url::ParseError), + Serialize(serde_json::Error), Reqwest(reqwest::Error), } impl std::fmt::Display for CreateError{ @@ -298,9 +298,9 @@ impl CloudContext{ .send().await } pub async fn create_asset(&self,config:CreateAssetRequest,body:impl Into>)->Result{ - let url=reqwest::Url::parse("https://apis.roblox.com/assets/v1/assets").map_err(CreateError::ParseError)?; + let url=reqwest::Url::parse("https://apis.roblox.com/assets/v1/assets").map_err(CreateError::Parse)?; - let request_config=serde_json::to_string(&config).map_err(CreateError::SerializeError)?; + let request_config=serde_json::to_string(&config).map_err(CreateError::Serialize)?; let part=reqwest::multipart::Part::bytes(body) //you must have a file name or roblox will 400!!!!!!!!!