diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-15 13:58:15 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-15 14:06:34 +0100 |
commit | eb4a6ce1060a847be0b62c6a10ff3ba956e3f34d (patch) | |
tree | 84f6746ec92ca3a5344da22edadcd1ac3413aa29 /src/util | |
parent | cf2af186fcc0c8f581a966454b6cd4720d3821f0 (diff) | |
parent | 7be3f15e45fcfff10a45302a040c2919a3ba8ccd (diff) | |
download | garage-eb4a6ce1060a847be0b62c6a10ff3ba956e3f34d.tar.gz garage-eb4a6ce1060a847be0b62c6a10ff3ba956e3f34d.zip |
Merge branch 'main' into next-0.10
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Cargo.toml | 3 | ||||
-rw-r--r-- | src/util/data.rs | 10 | ||||
-rw-r--r-- | src/util/error.rs | 4 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml index d72245dd..e4c31460 100644 --- a/src/util/Cargo.toml +++ b/src/util/Cargo.toml @@ -15,6 +15,7 @@ path = "lib.rs" [dependencies] garage_db.workspace = true +garage_net.workspace = true arc-swap.workspace = true async-trait.workspace = true @@ -40,8 +41,6 @@ toml.workspace = true futures.workspace = true tokio.workspace = true -netapp.workspace = true - http.workspace = true hyper.workspace = true diff --git a/src/util/data.rs b/src/util/data.rs index bdd8daee..2579fd1b 100644 --- a/src/util/data.rs +++ b/src/util/data.rs @@ -85,15 +85,15 @@ impl FixedBytes32 { } } -impl From<netapp::NodeID> for FixedBytes32 { - fn from(node_id: netapp::NodeID) -> FixedBytes32 { +impl From<garage_net::NodeID> for FixedBytes32 { + fn from(node_id: garage_net::NodeID) -> FixedBytes32 { FixedBytes32::try_from(node_id.as_ref()).unwrap() } } -impl From<FixedBytes32> for netapp::NodeID { - fn from(bytes: FixedBytes32) -> netapp::NodeID { - netapp::NodeID::from_slice(bytes.as_slice()).unwrap() +impl From<FixedBytes32> for garage_net::NodeID { + fn from(bytes: FixedBytes32) -> garage_net::NodeID { + garage_net::NodeID::from_slice(bytes.as_slice()).unwrap() } } diff --git a/src/util/error.rs b/src/util/error.rs index be7cdfdb..da9eda10 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -24,8 +24,8 @@ pub enum Error { #[error(display = "Invalid HTTP header value: {}", _0)] HttpHeader(#[error(source)] http::header::ToStrError), - #[error(display = "Netapp error: {}", _0)] - Netapp(#[error(source)] netapp::error::Error), + #[error(display = "Network error: {}", _0)] + Net(#[error(source)] garage_net::error::Error), #[error(display = "DB error: {}", _0)] Db(#[error(source)] garage_db::Error), |