Skip to content

Commit

Permalink
Serde defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
megrogan committed Nov 29, 2024
1 parent 654f6fb commit b8adf93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/canisters/user_index/impl/src/model/user_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use utils::time::MonthKey;
#[serde(from = "UserMapTrimmed")]
pub struct UserMap {
users: HashMap<UserId, User>,
#[serde(default)]
bots: HashMap<UserId, Bot>,
suspected_bots: BTreeSet<UserId>,
deleted_users: HashMap<UserId, TimestampMillis>,
Expand Down Expand Up @@ -453,10 +454,13 @@ pub enum UpdateUserResult {
#[derive(Deserialize)]
struct UserMapTrimmed {
users: HashMap<UserId, User>,
#[serde(default)]
bots: HashMap<UserId, Bot>,
suspected_bots: BTreeSet<UserId>,
deleted_users: HashMap<UserId, TimestampMillis>,
#[serde(default)]
suspended_or_unsuspended_users: BTreeSet<(TimestampMillis, UserId)>,
#[serde(default)]
unique_person_proofs_submitted: u32,
}

Expand Down

0 comments on commit b8adf93

Please sign in to comment.