mirror of
https://github.com/house-of-vanity/desubot.git
synced 2025-07-08 13:04:06 +00:00
Move Mystem to external lib. add /omedeto
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
use mystem::AppError as mystem_error;
|
||||
use reqwest::Error as reqwest_error;
|
||||
use rusqlite::Error as sqlite_error;
|
||||
use serde_json::Error as serde_error;
|
||||
@ -18,6 +19,7 @@ pub enum Error {
|
||||
FileNotFound,
|
||||
JsonParseError(serde_error),
|
||||
PopenError(popen_error),
|
||||
MystemError(mystem_error),
|
||||
}
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
@ -60,3 +62,9 @@ impl From<popen_error> for Error {
|
||||
return Error::PopenError(e);
|
||||
}
|
||||
}
|
||||
|
||||
impl From<mystem_error> for Error {
|
||||
fn from(e: mystem_error) -> Error {
|
||||
return Error::MystemError(e);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user