mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-13 07:46:51 +00:00
[import-netapp] import Netapp code into Garage codebase
This commit is contained in:
+1
-2
@@ -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
|
||||
|
||||
|
||||
+5
-5
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user