mirror of https://github.com/tikv/client-rust.git
Remove util module
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
parent
e7bd456722
commit
ced9c67adb
|
@ -191,3 +191,16 @@ impl From<kvproto::kvrpcpb::KeyError> for Error {
|
|||
|
||||
/// A result holding an [`Error`](Error).
|
||||
pub type Result<T> = result::Result<T, Error>;
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! internal_err {
|
||||
($e:expr) => ({
|
||||
let kind = $crate::Error::internal_error(
|
||||
format!("[{}:{}]: {}", file!(), line!(), $e)
|
||||
);
|
||||
$crate::Error::from(kind)
|
||||
});
|
||||
($f:tt, $($arg:expr),+) => ({
|
||||
internal_err!(format!($f, $($arg),+))
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#[macro_use]
|
||||
pub mod util;
|
||||
pub mod config;
|
||||
#[macro_use]
|
||||
pub mod errors;
|
||||
pub mod kv;
|
||||
pub mod security;
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
// Copyright 2018 TiKV Project Authors. Licensed under Apache-2.0.
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! internal_err {
|
||||
($e:expr) => ({
|
||||
let kind = $crate::Error::internal_error(
|
||||
format!("[{}:{}]: {}", file!(), line!(), $e)
|
||||
);
|
||||
$crate::Error::from(kind)
|
||||
});
|
||||
($f:tt, $($arg:expr),+) => ({
|
||||
internal_err!(format!($f, $($arg),+))
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue