aboutsummaryrefslogtreecommitdiff
path: root/src/model/k2v
diff options
context:
space:
mode:
authorAlex <lx@deuxfleurs.fr>2025-01-29 18:25:44 +0000
committerAlex <lx@deuxfleurs.fr>2025-01-29 18:25:44 +0000
commitab71544499679685877cd7bd683ba4556b4331f2 (patch)
tree7445be8428cfccd0996109b23a06ec2b7b959f40 /src/model/k2v
parent991edbe02c9493e932614f1b801fe2bbdf020c53 (diff)
parent9f3c7c3720d323bc9df3892197e6da5d89d1b84a (diff)
downloadgarage-ab71544499679685877cd7bd683ba4556b4331f2.tar.gz
garage-ab71544499679685877cd7bd683ba4556b4331f2.zip
Merge pull request 'api: better handling of helper errors to distinguish error codes' (#942) from fix-getkeyinfo-404 into mainHEADmain
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/942
Diffstat (limited to 'src/model/k2v')
-rw-r--r--src/model/k2v/causality.rs6
1 files changed, 0 insertions, 6 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)