fix: compile error

This commit is contained in:
mostafaei2002 2024-06-11 21:35:47 +03:30
parent 2389916b9d
commit e0378903d9

View file

@ -168,7 +168,7 @@ impl crate::disk::state::Xvb {
ui.add_space(space_h); ui.add_space(space_h);
let mut is_slider_enabled = true; let mut is_slider_enabled = true;
let hashrate_xmrig = { let mut hashrate_xmrig = {
if lock!(gui_api_xmrig).hashrate_raw_15m > 0.0 { if lock!(gui_api_xmrig).hashrate_raw_15m > 0.0 {
lock!(gui_api_xmrig).hashrate_raw_15m lock!(gui_api_xmrig).hashrate_raw_15m
} else if lock!(gui_api_xmrig).hashrate_raw_1m > 0.0 { } else if lock!(gui_api_xmrig).hashrate_raw_1m > 0.0 {
@ -183,14 +183,11 @@ impl crate::disk::state::Xvb {
// Adjust maximum slider amount based on slider metric // Adjust maximum slider amount based on slider metric
match self.manual_donation_metric { if self.manual_donation_metric == ManualDonationMetric::Kilo {
ManualDonationMetric::Kilo => {
hashrate_xmrig /= 1000.0; hashrate_xmrig /= 1000.0;
}, } else if self.manual_donation_metric == ManualDonationMetric::Mega {
ManualDonationMetric::Mega => {
hashrate_xmrig /= 1_000_000.0; hashrate_xmrig /= 1_000_000.0;
} }
}
let slider_help_text = if self.mode == XvbMode::ManualXvb { let slider_help_text = if self.mode == XvbMode::ManualXvb {