fix: s/unknownError/customError/g

This commit is contained in:
rymnc
2023-04-25 15:27:44 +05:30
parent 1d1f183a3e
commit 9ce7c44a28

View File

@@ -27,14 +27,14 @@ pub enum TreeErrorKind {
MerkleTreeIsFull,
InvalidKey,
IndexOutOfBounds,
UnknownError(String),
CustomError(String),
}
#[derive(Debug)]
pub enum DatabaseErrorKind {
CannotLoadDatabase,
DatabaseExists,
UnknownError(String),
CustomError(String),
}
#[derive(Debug)]
@@ -43,8 +43,8 @@ pub enum PmtreeErrorKind {
DatabaseError(DatabaseErrorKind),
/// Error in tree
TreeError(TreeErrorKind),
/// Unknown error
UnknownError(String),
/// Custom error
CustomError(String),
}
impl Display for PmtreeErrorKind {
@@ -52,7 +52,7 @@ impl Display for PmtreeErrorKind {
match self {
PmtreeErrorKind::DatabaseError(e) => write!(f, "Database error: {e:?}"),
PmtreeErrorKind::TreeError(e) => write!(f, "Tree error: {e:?}"),
PmtreeErrorKind::UnknownError(e) => write!(f, "Unknown error: {e:?}"),
PmtreeErrorKind::CustomError(e) => write!(f, "Custom error: {e:?}"),
}
}
}