Skip to content

Commit

Permalink
Merge pull request #3879 from drmingdrmer/anyerr
Browse files Browse the repository at this point in the history
[metasrv] refactor: use external anyerror as an error wrapper of any other error
  • Loading branch information
mergify[bot] authored Jan 17, 2022
2 parents 52601af + a6f768b commit b62495a
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 216 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions metasrv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ common-metrics = { path = "../common/metrics" }
# Github dependencies

# Crates.io dependencies
anyerror = "0.1.1"
anyhow = "1.0.52"
async-raft = { git = "https://github.com/datafuselabs/openraft", tag = "v0.6.2-alpha.14.1" }
async-trait = "0.1.52"
Expand Down
131 changes: 0 additions & 131 deletions metasrv/src/any_error/any_error_impl.rs

This file was deleted.

17 changes: 0 additions & 17 deletions metasrv/src/any_error/mod.rs

This file was deleted.

3 changes: 1 addition & 2 deletions metasrv/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use anyerror::AnyError;
use common_exception::ErrorCode;
use common_exception::SerializedError;
use common_meta_types::NodeId;
use serde::Deserialize;
use serde::Serialize;
use thiserror::Error;

use crate::any_error::AnyError;

/// Top level error MetaNode would return.
#[derive(Error, Serialize, Deserialize, Debug, Clone, PartialEq)]
pub enum MetaError {
Expand Down
1 change: 0 additions & 1 deletion metasrv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#![feature(backtrace)]

pub mod any_error;
pub mod api;
pub mod configs;
pub mod errors;
Expand Down
64 changes: 0 additions & 64 deletions metasrv/tests/it/any_error.rs

This file was deleted.

1 change: 0 additions & 1 deletion metasrv/tests/it/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

mod any_error;
mod api;
mod configs;
mod grpc;
Expand Down

0 comments on commit b62495a

Please sign in to comment.