Move Mystem to external lib. add /omedeto

This commit is contained in:
AB
2020-12-29 17:01:56 +03:00
parent 2d43a7d875
commit 9aaa8a94f1
8 changed files with 205 additions and 2162 deletions

View File

@ -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);
}
}