Skip to content

Commit

Permalink
fix(typo): filed -> field (#2519)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntiTopQuark committed Sep 2, 2024
1 parent ab41cbb commit 68516e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/storage/rdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,14 @@ Status RDB::saveRdbObject(engine::Context &ctx, int type, const std::string &key
} else if (type == RDBTypeHash || type == RDBTypeHashListPack || type == RDBTypeHashZipList ||
type == RDBTypeHashZipMap) {
const auto &entries = std::get<std::map<std::string, std::string>>(obj);
std::vector<FieldValue> filed_values;
filed_values.reserve(entries.size());
std::vector<FieldValue> field_values;
field_values.reserve(entries.size());
for (const auto &entry : entries) {
filed_values.emplace_back(entry.first, entry.second);
field_values.emplace_back(entry.first, entry.second);
}
redis::Hash hash_db(storage_, ns_);
uint64_t count = 0;
db_status = hash_db.MSet(ctx, key, filed_values, false /*nx*/, &count);
db_status = hash_db.MSet(ctx, key, field_values, false /*nx*/, &count);
} else if (type == RDBTypeList || type == RDBTypeListZipList || type == RDBTypeListQuickList ||
type == RDBTypeListQuickList2) {
const auto &elements = std::get<std::vector<std::string>>(obj);
Expand Down
2 changes: 1 addition & 1 deletion src/storage/rdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class RDB {
Status SaveZSetObject(const std::vector<MemberScore> &member_scores);

// Hash
Status SaveHashObject(const std::vector<FieldValue> &filed_value);
Status SaveHashObject(const std::vector<FieldValue> &field_value);

private:
engine::Storage *storage_;
Expand Down

0 comments on commit 68516e5

Please sign in to comment.