Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
pjenvey committed Jul 22, 2024
1 parent fba5073 commit 6d10d2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions autopush-common/src/db/bigtable/bigtable_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ impl BigTableClientImpl {
});
};

cells.extend(channels_to_cells(Cow::Borrowed(&user._channels), expiry));
cells.extend(channels_to_cells(Cow::from(&user.priv_channels), expiry));

row.add_cells(ROUTER_FAMILY, cells);
row
Expand Down Expand Up @@ -986,7 +986,7 @@ impl DbClient for BigTableClientImpl {
}

// Read the channels last, after removal of all non channel cells
result._channels = channels_from_cells(&row.cells)?;
result.priv_channels = channels_from_cells(&row.cells)?;

Ok(Some(result))
}
Expand Down Expand Up @@ -1027,7 +1027,7 @@ impl DbClient for BigTableClientImpl {
// value
row.add_cells(
ROUTER_FAMILY,
channels_to_cells(Cow::Owned(channels), expiry),
channels_to_cells(Cow::from(channels), expiry),
);

self.write_row(row).await?;
Expand Down
4 changes: 2 additions & 2 deletions autopush-common/src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pub struct User {
/// flexible API that might benefit different, non Bigtable [DbClient]
/// backends that don't necessarily store the channel ids in the router
/// record).
_channels: HashSet<Uuid>,
priv_channels: HashSet<Uuid>,
}

impl Default for User {
Expand All @@ -191,7 +191,7 @@ impl Default for User {
record_version: Some(USER_RECORD_VERSION),
current_timestamp: None,
version: Some(Uuid::new_v4()),
_channels: HashSet::new(),
priv_channels: HashSet::new(),
}
}
}
Expand Down

0 comments on commit 6d10d2c

Please sign in to comment.