mirror of
https://github.com/SkyfallWasTaken/arcade-monitor.git
synced 2024-11-25 10:23:41 +00:00
Merge pull request #4 from achester88/main
Added Code to Show two decimals places for Price/ticket ratio
This commit is contained in:
commit
a2d385e5dc
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ pub fn format_item_diff(
|
||||||
},
|
},
|
||||||
if let Some(real_price) = real_price {
|
if let Some(real_price) = real_price {
|
||||||
format!(
|
format!(
|
||||||
" _(${real_price} - ${}/hr)_",
|
" _(${real_price} - ${:.2}/hr)_",
|
||||||
(*real_price as f32) / (new.price as f32)
|
(*real_price as f32) / (new.price as f32)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -285,7 +285,7 @@ mod diff_tests {
|
||||||
Some(
|
Some(
|
||||||
indoc! {"
|
indoc! {"
|
||||||
*Name:* Test
|
*Name:* Test
|
||||||
*Price:* 1 → 2 🔼 _($50 - $25/hr)_"}
|
*Price:* 1 → 2 🔼 _($50 - $25.00/hr)_"}
|
||||||
.into()
|
.into()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue