aboutsummaryrefslogtreecommitdiff
path: root/src/table/table.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-24 10:10:01 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-24 10:10:01 +0000
commitd8f5e643bcee95969b59c309809710a38b0661e3 (patch)
tree9bb179f351f60fc0396db731cb8ca0fe25dde17e /src/table/table.rs
parent51fb3799a153a0db990fc74a37563ec612e20fc2 (diff)
downloadgarage-d8f5e643bcee95969b59c309809710a38b0661e3.tar.gz
garage-d8f5e643bcee95969b59c309809710a38b0661e3.zip
Split code for modular compilation
Diffstat (limited to 'src/table/table.rs')
-rw-r--r--src/table/table.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/table/table.rs b/src/table/table.rs
index 50e8739a..94bacc60 100644
--- a/src/table/table.rs
+++ b/src/table/table.rs
@@ -8,14 +8,14 @@ use futures::stream::*;
use serde::{Deserialize, Serialize};
use serde_bytes::ByteBuf;
-use crate::data::*;
-use crate::error::Error;
+use garage_util::data::*;
+use garage_util::error::Error;
-use crate::rpc::membership::{Ring, System};
-use crate::rpc::rpc_client::*;
-use crate::rpc::rpc_server::*;
+use garage_rpc::membership::{Ring, System};
+use garage_rpc::rpc_client::*;
+use garage_rpc::rpc_server::*;
-use crate::table::table_sync::*;
+use crate::table_sync::*;
const TABLE_RPC_TIMEOUT: Duration = Duration::from_secs(10);
@@ -78,14 +78,14 @@ impl PartitionKey for EmptyKey {
}
}
-impl<T: AsRef<str>> PartitionKey for T {
+impl PartitionKey for String {
fn hash(&self) -> Hash {
- hash(self.as_ref().as_bytes())
+ hash(self.as_bytes())
}
}
-impl<T: AsRef<str>> SortKey for T {
+impl SortKey for String {
fn sort_key(&self) -> &[u8] {
- self.as_ref().as_bytes()
+ self.as_bytes()
}
}