aboutsummaryrefslogtreecommitdiff
path: root/src/table/table.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-14 12:34:01 +0100
committerAlex Auvolat <alex@adnab.me>2021-12-15 15:39:10 +0100
commit8f6026de5ecd44cbe0fc0bcd47638a1ece860439 (patch)
tree5adf96c2218aa27b59eeb66cda676895979d4257 /src/table/table.rs
parent945b75dbf1de8bb22ebf9824727a2c45561bfcf4 (diff)
downloadgarage-8f6026de5ecd44cbe0fc0bcd47638a1ece860439.tar.gz
garage-8f6026de5ecd44cbe0fc0bcd47638a1ece860439.zip
Make table name a const in trait
Diffstat (limited to 'src/table/table.rs')
-rw-r--r--src/table/table.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/table/table.rs b/src/table/table.rs
index e1357471..396888c1 100644
--- a/src/table/table.rs
+++ b/src/table/table.rs
@@ -55,18 +55,12 @@ where
{
// =============== PUBLIC INTERFACE FUNCTIONS (new, insert, get, etc) ===============
- pub fn new(
- instance: F,
- replication: R,
- system: Arc<System>,
- db: &sled::Db,
- name: String,
- ) -> Arc<Self> {
+ pub fn new(instance: F, replication: R, system: Arc<System>, db: &sled::Db) -> Arc<Self> {
let endpoint = system
.netapp
- .endpoint(format!("garage_table/table.rs/Rpc:{}", name));
+ .endpoint(format!("garage_table/table.rs/Rpc:{}", F::TABLE_NAME));
- let data = TableData::new(system.clone(), name, instance, replication, db);
+ let data = TableData::new(system.clone(), instance, replication, db);
let merkle_updater = MerkleUpdater::launch(&system.background, data.clone());