summaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2023-11-19 18:04:57 +0100
committerCyborus <cyborus@cyborus.xyz>2023-11-19 18:04:57 +0100
commit753dc34b5ab59be348a1503e0400505766bad3fa (patch)
tree5f38a1ee7cec1293cb246fd18b55a2d23d6ad64a /src/lib.rs
parentMerge pull request 'add tag functionality' (#8) from tags into main (diff)
downloadforgejo-api-753dc34b5ab59be348a1503e0400505766bad3fa.tar.xz
forgejo-api-753dc34b5ab59be348a1503e0400505766bad3fa.zip
remove `dbg`s
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 6cc80b1..e76fab5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -69,7 +69,6 @@ impl Forgejo {
.user_agent(user_agent)
.default_headers(headers)
.build()?;
- dbg!(&client);
Ok(Self { url, client })
}
@@ -122,7 +121,7 @@ impl Forgejo {
}
async fn execute<T: DeserializeOwned>(&self, request: Request) -> Result<T, ForgejoError> {
- let response = self.client.execute(dbg!(request)).await?;
+ let response = self.client.execute(request).await?;
match response.status() {
status if status.is_success() => Ok(response.json::<T>().await?),
status if status.is_client_error() => Err(ForgejoError::ApiError(
@@ -138,7 +137,7 @@ impl Forgejo {
&self,
request: Request,
) -> Result<Option<T>, ForgejoError> {
- let response = self.client.execute(dbg!(request)).await?;
+ let response = self.client.execute(request).await?;
match response.status() {
status if status.is_success() => Ok(Some(response.json::<T>().await?)),
StatusCode::NOT_FOUND => Ok(None),