Skip to content

Commit bdc6cc3

Browse files
committed
fixup! Add protocol compliant PostgresKvStore impl.
1 parent 3a0fb9a commit bdc6cc3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rust/impls/src/postgres_store.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl KvStore for PostgresBackendImpl {
238238
async fn put(
239239
&self, user_token: String, request: PutObjectRequest,
240240
) -> Result<PutObjectResponse, VssError> {
241-
let store_id = &request.store_id;
241+
let store_id = request.store_id;
242242
if request.transaction_items.len() + request.delete_items.len() > MAX_PUT_REQUEST_ITEM_COUNT
243243
{
244244
return Err(VssError::InvalidRequestError(format!(
@@ -261,7 +261,7 @@ impl KvStore for PostgresBackendImpl {
261261
if let Some(global_version) = request.global_version {
262262
let global_version_record = self.build_vss_record(
263263
user_token,
264-
store_id.to_string(),
264+
store_id,
265265
KeyValue {
266266
key: GLOBAL_VERSION_KEY.to_string(),
267267
value: Bytes::new(),
@@ -313,11 +313,11 @@ impl KvStore for PostgresBackendImpl {
313313
async fn delete(
314314
&self, user_token: String, request: DeleteObjectRequest,
315315
) -> Result<DeleteObjectResponse, VssError> {
316-
let store_id = &request.store_id;
316+
let store_id = request.store_id;
317317
let key_value = request.key_value.ok_or_else(|| {
318318
VssError::InvalidRequestError("key_value missing in DeleteObjectRequest".to_string())
319319
})?;
320-
let vss_record = self.build_vss_record(user_token, store_id.to_string(), key_value);
320+
let vss_record = self.build_vss_record(user_token, store_id, key_value);
321321

322322
let mut conn = self
323323
.pool

0 commit comments

Comments
 (0)