fix: implement default for Xvb state

This commit is contained in:
mostafaei2002 2024-06-12 15:42:56 +03:30
parent d76abe1058
commit f41e6c9647

View file

@ -243,7 +243,7 @@ pub struct Xmrig {
pub token: String, pub token: String,
} }
#[derive(Clone, PartialEq, Debug, Deserialize, Serialize, Default)] #[derive(Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct Xvb { pub struct Xvb {
pub simple: bool, pub simple: bool,
pub token: String, pub token: String,
@ -399,6 +399,21 @@ impl Default for Xmrig {
} }
} }
impl Default for Xvb {
fn default() -> Self {
Self {
simple: true,
token: "".to_string(),
simple_hero_mode: false,
mode: XvbMode::Auto,
manual_amount_raw: 0.0,
manual_slider_amount: 0.0,
manual_donation_level: ManualDonationLevel::Donor,
manual_donation_metric: ManualDonationMetric::Hash,
}
}
}
impl Default for Version { impl Default for Version {
fn default() -> Self { fn default() -> Self {
Self { Self {