diff options
author | Alex Auvolat <alex@adnab.me> | 2022-12-14 10:48:49 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-12-14 10:48:49 +0100 |
commit | f8e528c15de0c9d31c16e5cd8e58f99f4132f103 (patch) | |
tree | ac8224d7256b01cbaa252fbc2382afa31daba474 /src/model/index_counter.rs | |
parent | d1279e04f3550eae2eb5e0f25efbdf69b42fbeb9 (diff) | |
download | garage-f8e528c15de0c9d31c16e5cd8e58f99f4132f103.tar.gz garage-f8e528c15de0c9d31c16e5cd8e58f99f4132f103.zip |
Small refactor of tables internals
Diffstat (limited to 'src/model/index_counter.rs')
-rw-r--r-- | src/model/index_counter.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/model/index_counter.rs b/src/model/index_counter.rs index b9594406..bcf55942 100644 --- a/src/model/index_counter.rs +++ b/src/model/index_counter.rs @@ -251,13 +251,9 @@ impl<T: CountedItem> IndexCounter<T> { TR: TableReplication, { let save_counter_entry = |entry: CounterEntry<T>| -> Result<(), Error> { - let entry_k = self - .table - .data - .tree_key(entry.partition_key(), entry.sort_key()); self.table .data - .update_entry_with(&entry_k, |ent| match ent { + .update_entry_with(&entry.partition_key(), &entry.sort_key(), |ent| match ent { Some(mut ent) => { ent.merge(&entry); ent |