From 8f6026de5ecd44cbe0fc0bcd47638a1ece860439 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 14 Dec 2021 12:34:01 +0100 Subject: Make table name a const in trait --- src/table/table.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/table/table.rs') 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, - db: &sled::Db, - name: String, - ) -> Arc { + pub fn new(instance: F, replication: R, system: Arc, db: &sled::Db) -> Arc { 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()); -- cgit v1.2.3