mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-09 06:47:59 -06:00
Fix latency issue
This commit is contained in:
@@ -3,7 +3,7 @@ use std::fmt;
|
||||
pub type Result<T> = std::result::Result<T, ModuleError>;
|
||||
|
||||
///Generic error type for module-related operations.
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
|
||||
pub enum ModuleError {
|
||||
LibLoadingError(String),
|
||||
// LogError(log::SetLoggerError),
|
||||
@@ -54,3 +54,9 @@ impl fmt::Display for ModuleError {
|
||||
f.write_str(format!("{:?}", self).as_str())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ModuleError> for std::string::String {
|
||||
fn from(value: ModuleError) -> Self {
|
||||
value.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user