From 438a35fd1a12ac31e8820a9887e08cced620c8ed 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 | 7 +++++-- autopush-common/src/db/mod.rs | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/autopush-common/src/db/bigtable/bigtable_client/mod.rs b/autopush-common/src/db/bigtable/bigtable_client/mod.rs index 835419453..a19fad064 100644 --- a/autopush-common/src/db/bigtable/bigtable_client/mod.rs +++ b/autopush-common/src/db/bigtable/bigtable_client/mod.rs @@ -811,7 +811,10 @@ impl BigTableClientImpl { }); }; - cells.extend(channels_to_cells(Cow::Borrowed(&user._channels), expiry)); + cells.extend(channels_to_cells( + Cow::Borrowed(&user.priv_channels), + expiry, + )); row.add_cells(ROUTER_FAMILY, cells); row @@ -986,7 +989,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)) } diff --git a/autopush-common/src/db/mod.rs b/autopush-common/src/db/mod.rs index 206ed020e..4ed9e5a64 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(), } } }