aboutsummaryrefslogtreecommitdiff
path: root/src/model/k2v
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/k2v')
-rw-r--r--src/model/k2v/causality.rs6
-rw-r--r--src/model/k2v/rpc.rs2
2 files changed, 0 insertions, 8 deletions
diff --git a/src/model/k2v/causality.rs b/src/model/k2v/causality.rs
index c80ebd39..7d311ede 100644
--- a/src/model/k2v/causality.rs
+++ b/src/model/k2v/causality.rs
@@ -16,8 +16,6 @@ use serde::{Deserialize, Serialize};
use garage_util::data::*;
-use crate::helper::error::{Error as HelperError, OkOrBadRequest};
-
/// Node IDs used in K2V are u64 integers that are the abbreviation
/// of full Garage node IDs which are 256-bit UUIDs.
pub type K2VNodeId = u64;
@@ -99,10 +97,6 @@ impl CausalContext {
Some(ret)
}
- pub fn parse_helper(s: &str) -> Result<Self, HelperError> {
- Self::parse(s).ok_or_bad_request("Invalid causality token")
- }
-
/// Check if this causal context contains newer items than another one
pub fn is_newer_than(&self, other: &Self) -> bool {
vclock_gt(&self.vector_clock, &other.vector_clock)
diff --git a/src/model/k2v/rpc.rs b/src/model/k2v/rpc.rs
index a1bf6ee0..821f4549 100644
--- a/src/model/k2v/rpc.rs
+++ b/src/model/k2v/rpc.rs
@@ -10,7 +10,6 @@ use std::convert::TryInto;
use std::sync::{Arc, Mutex, MutexGuard};
use std::time::{Duration, Instant};
-use async_trait::async_trait;
use futures::stream::FuturesUnordered;
use futures::StreamExt;
use serde::{Deserialize, Serialize};
@@ -537,7 +536,6 @@ impl K2VRpcHandler {
}
}
-#[async_trait]
impl EndpointHandler<K2VRpc> for K2VRpcHandler {
async fn handle(self: &Arc<Self>, message: &K2VRpc, _from: NodeID) -> Result<K2VRpc, Error> {
match message {