diff options
author | Cyborus <cyborus@cyborus.xyz> | 2023-11-19 18:04:57 +0100 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2023-11-19 18:04:57 +0100 |
commit | 753dc34b5ab59be348a1503e0400505766bad3fa (patch) | |
tree | 5f38a1ee7cec1293cb246fd18b55a2d23d6ad64a /src/lib.rs | |
parent | Merge pull request 'add tag functionality' (#8) from tags into main (diff) | |
download | forgejo-api-753dc34b5ab59be348a1503e0400505766bad3fa.tar.xz forgejo-api-753dc34b5ab59be348a1503e0400505766bad3fa.zip |
remove `dbg`s
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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), |