You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main.rs
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,18 @@
1
+
use comfy_table::presets::UTF8_FULL;
1
2
use comfy_table::Table;
3
+
use comfy_table::TableComponent::*;
2
4
3
5
structAsset{
4
6
ticker:String,
5
7
buy_price_cents:u32,
8
+
// technically we don't care about the current price if it is sold, but it is still a valid property to have, so we include it here, although it isn't displayed
6
9
current_price_cents:u32,
7
10
// if sell price is None, it isn't sold
8
11
sell_price_cents:Option<u32>,
9
12
}
10
13
11
14
fnis_asset_sold(asset:&Asset) -> bool{
15
+
// if there is no sell price, then it isn't sold (i.e., it is currently held)
0 commit comments