remove nesting layer

This commit is contained in:
bitfl0wer 2023-05-07 00:18:06 +02:00
parent 222a552017
commit 621b05570a
No known key found for this signature in database
GPG Key ID: 84BBB60DF895ABF2
1 changed files with 28 additions and 31 deletions

View File

@ -1,4 +1,4 @@
pub mod instance {
use reqwest::Client;
use serde_json::from_str;
@ -11,9 +11,7 @@ pub mod instance {
# Errors
[`InstanceServerError`] - If the request fails.
*/
pub async fn instance_policies_schema(
&self,
) -> Result<InstancePolicies, InstanceServerError> {
pub async fn instance_policies_schema(&self) -> Result<InstancePolicies, InstanceServerError> {
let client = Client::new();
let endpoint_url = self.urls.get_api().to_string() + "/policies/instance/";
let request = match client.get(&endpoint_url).send().await {
@ -37,7 +35,6 @@ pub mod instance {
Ok(instance_policies_schema)
}
}
}
#[cfg(test)]
mod instance_policies_schema_test {