From 42752b95786d15cbc7d3ffe96c4504a6e50eaaee Mon Sep 17 00:00:00 2001 From: Evan <0xIchigo@protonmail.com> Date: Tue, 30 Apr 2024 03:38:08 -0400 Subject: [PATCH] Update Default Implementations For options.rs --- src/types/options.rs | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/src/types/options.rs b/src/types/options.rs index 3564a2e..adc71bb 100644 --- a/src/types/options.rs +++ b/src/types/options.rs @@ -1,6 +1,6 @@ use serde::{Deserialize, Serialize}; -#[derive(Serialize, Deserialize, Debug)] +#[derive(Serialize, Deserialize, Debug, Default)] #[serde(rename_all = "camelCase")] pub struct DisplayOptions { pub show_collection_metadata: bool, @@ -14,23 +14,7 @@ pub struct DisplayOptions { pub show_closed_accounts: bool, } -impl Default for DisplayOptions { - fn default() -> Self { - Self { - show_unverified_collections: false, - show_collection_metadata: false, - show_fungible: false, - show_closed_accounts: false, - show_grand_total: false, - show_raw_data: false, - require_full_index: false, - show_system_metadata: false, - show_zero_balance: false, - } - } -} - -#[derive(Serialize, Deserialize, Debug)] +#[derive(Serialize, Deserialize, Debug, Default)] #[serde(rename_all = "camelCase")] pub struct GetAssetOptions { pub show_collection_metadata: bool, @@ -42,18 +26,3 @@ pub struct GetAssetOptions { pub show_native_balance: bool, pub show_inscription: bool, } - -impl Default for GetAssetOptions { - fn default() -> Self { - Self { - show_collection_metadata: false, - show_unverified_collections: false, - show_raw_data: false, - show_fungible: false, - require_full_index: false, - show_system_metadata: false, - show_native_balance: false, - show_inscription: false, - } - } -}