From 951c8f1438aa63d52580acce44325ddd39183839 Mon Sep 17 00:00:00 2001 From: Akshett Rai Jindal Date: Sat, 24 Aug 2024 13:39:05 +0530 Subject: [PATCH] Derive Default for `BusinessIntro`, `BusinessLocation` and `BusinessOpeningHours` --- crates/teloxide-core/src/types/business_intro.rs | 2 +- crates/teloxide-core/src/types/business_location.rs | 2 +- crates/teloxide-core/src/types/business_opening_hours.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/teloxide-core/src/types/business_intro.rs b/crates/teloxide-core/src/types/business_intro.rs index b4ce8694..c4684211 100644 --- a/crates/teloxide-core/src/types/business_intro.rs +++ b/crates/teloxide-core/src/types/business_intro.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; use crate::types::Sticker; /// An introduction for a Business. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] pub struct BusinessIntro { /// Title text of the business intro pub title: Option, diff --git a/crates/teloxide-core/src/types/business_location.rs b/crates/teloxide-core/src/types/business_location.rs index 7763a0de..514fe581 100644 --- a/crates/teloxide-core/src/types/business_location.rs +++ b/crates/teloxide-core/src/types/business_location.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; use crate::types::Location; /// Details about the location of a Business -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] pub struct BusinessLocation { /// Address of the business. pub address: String, diff --git a/crates/teloxide-core/src/types/business_opening_hours.rs b/crates/teloxide-core/src/types/business_opening_hours.rs index 0ebddbfe..f6bac2b9 100644 --- a/crates/teloxide-core/src/types/business_opening_hours.rs +++ b/crates/teloxide-core/src/types/business_opening_hours.rs @@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize}; use crate::types::BusinessOpeningHoursInterval; /// Details about the opening hours of a Business. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)] pub struct BusinessOpeningHours { /// Unique name of the time zone for which the opening hours are defined. pub time_zone_name: String,