From 41c66c9b3f43208013df30290ffb3a426e714335 Mon Sep 17 00:00:00 2001 From: Ron Kuris Date: Mon, 19 Aug 2024 09:08:42 -1000 Subject: [PATCH] Remove nix dependency (#703) --- firewood/Cargo.toml | 1 - firewood/src/db.rs | 2 -- firewood/src/v2/db.rs | 1 - 3 files changed, 4 deletions(-) diff --git a/firewood/Cargo.toml b/firewood/Cargo.toml index af6e55f5d..d098bf2c3 100644 --- a/firewood/Cargo.toml +++ b/firewood/Cargo.toml @@ -22,7 +22,6 @@ storage = { version = "0.0.4", path = "../storage" } futures = "0.3.30" hex = "0.4.3" metered = "0.9.0" -nix = {version = "0.28.0", features = ["fs", "uio"]} serde = { version = "1.0" } sha2 = "0.10.8" thiserror = "1.0.57" diff --git a/firewood/src/db.rs b/firewood/src/db.rs index abd880921..6d7918b25 100644 --- a/firewood/src/db.rs +++ b/firewood/src/db.rs @@ -27,7 +27,6 @@ const _VERSION_STR: &[u8; 16] = b"firewood v0.1\0\0\0"; pub enum DbError { InvalidParams, Merkle(MerkleError), - System(nix::Error), CreateError, IO(std::io::Error), InvalidProposal, @@ -38,7 +37,6 @@ impl fmt::Display for DbError { match self { DbError::InvalidParams => write!(f, "invalid parameters provided"), DbError::Merkle(e) => write!(f, "merkle error: {e:?}"), - DbError::System(e) => write!(f, "system error: {e:?}"), DbError::CreateError => write!(f, "database create error"), DbError::IO(e) => write!(f, "I/O error: {e:?}"), DbError::InvalidProposal => write!(f, "invalid proposal"), diff --git a/firewood/src/v2/db.rs b/firewood/src/v2/db.rs index cff28aa85..6caca6509 100644 --- a/firewood/src/v2/db.rs +++ b/firewood/src/v2/db.rs @@ -19,7 +19,6 @@ impl From for api::Error { match value { DbError::InvalidParams => api::Error::InternalError(Box::new(value)), DbError::Merkle(e) => api::Error::InternalError(Box::new(e)), - DbError::System(e) => api::Error::IO(e.into()), DbError::CreateError => api::Error::InternalError(Box::new(value)), DbError::IO(e) => api::Error::IO(e), DbError::InvalidProposal => api::Error::InvalidProposal,