From 6d10d2cb52fe654701ff3e6fa9ae177b096ec598 Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Mon, 22 Jul 2024 11:28:47 -0700 Subject: [PATCH] review --- autopush-common/src/db/bigtable/bigtable_client/mod.rs | 6 +++--- autopush-common/src/db/mod.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/autopush-common/src/db/bigtable/bigtable_client/mod.rs b/autopush-common/src/db/bigtable/bigtable_client/mod.rs index 83541945..dd944955 100644 --- a/autopush-common/src/db/bigtable/bigtable_client/mod.rs +++ b/autopush-common/src/db/bigtable/bigtable_client/mod.rs @@ -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 @@ -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)) } @@ -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?; diff --git a/autopush-common/src/db/mod.rs b/autopush-common/src/db/mod.rs index 206ed020..4ed9e5a6 100644 --- a/autopush-common/src/db/mod.rs +++ b/autopush-common/src/db/mod.rs @@ -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, + priv_channels: HashSet, } impl Default for User { @@ -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(), } } }