add: display for Account
This commit is contained in:
parent
80413bfc81
commit
14258d0532
|
@ -1,8 +1,6 @@
|
|||
use postgres_types::{ToSql, FromSql};
|
||||
|
||||
use crate::ds::account::portfolio::Portfolio;
|
||||
|
||||
#[derive(PartialEq, Debug, ToSql, FromSql)]
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub struct Account {
|
||||
pub username: String,
|
||||
pub email: String,
|
||||
|
@ -11,3 +9,9 @@ pub struct Account {
|
|||
pub portfolio: Portfolio,
|
||||
pub transactions: Vec<f64>
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Account {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "({}, {}, {}, {}, {}, {:#?})", self.username, self.email, self.is_pass, self.pass_hash, self.portfolio, self.transactions)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user