Skip to content

Commit

Permalink
Update to bon 2.2 with the new #[derive(Builder)] syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Veetaha committed Sep 8, 2024
1 parent e19ef46 commit c158042
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 644 deletions.
5 changes: 2 additions & 3 deletions src/api/async_telegram_api_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ use super::HttpError;
use crate::api_traits::AsyncTelegramApi;
use crate::api_traits::ErrorResponse;
use async_trait::async_trait;
use bon::builder;
use bon::Builder;
use reqwest::multipart;
use serde_json::Value;
use std::path::PathBuf;
use std::time::Duration;
use tokio::fs::File;

#[builder]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Builder)]
#[must_use = "API needs to be used in order to be useful"]
pub struct AsyncApi {
#[builder(into)]
Expand Down
5 changes: 2 additions & 3 deletions src/api/telegram_api_impl.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
use super::Error;
use super::HttpError;
use crate::api_traits::TelegramApi;
use bon::builder;
use bon::Builder;
use multipart::client::lazy::Multipart;
use serde_json::Value;
use std::path::PathBuf;
use std::time::Duration;
use ureq::Response;

#[builder]
#[derive(Debug, Clone)]
#[derive(Debug, Clone, Builder)]
#[must_use = "API needs to be used in order to be useful"]
pub struct Api {
#[builder(into)]
Expand Down
Loading

0 comments on commit c158042

Please sign in to comment.