Simplify storageQuotaKey() function implementation

Co-authored-by: Trevor Clinkenbeard <trevor.clinkenbeard@snowflake.com>
This commit is contained in:
Ankita Kejriwal 2022-07-18 15:56:11 -07:00 committed by GitHub
parent 882df774c0
commit 2757262ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -1414,10 +1414,7 @@ const KeyRangeRef storageQuotaKeys(LiteralStringRef("\xff/storageQuota/"), Liter
const KeyRef storageQuotaPrefix = storageQuotaKeys.begin;
Key storageQuotaKey(StringRef tenantName) {
BinaryWriter wr(Unversioned());
wr.serializeBytes(storageQuotaPrefix);
wr << tenantName;
return wr.toValue();
return tenantName.withPrefix(storageQuotaPrefix);
}
// for tests