diff --git a/autopush-common/src/db/bigtable/bigtable_client/mod.rs b/autopush-common/src/db/bigtable/bigtable_client/mod.rs index 835419453..dd9449552 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 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(), } } }