mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
word segmentation and clipboard first word detector
This commit is contained in:
1 parent
29a4d14893
commit
1614db6e99
19 files changed
+502
-13
No files matched your search
@@ -1,5 +1,6 @@
|
||||
use serde::Serialize;
|
||||
use thiserror::Error;
|
||||
use vibrato::errors::VibratoError;
|
||||
use zip::result::ZipError;
|
||||
|
||||
#[derive(Debug, Error, Serialize)]
|
||||
@@ -23,6 +24,9 @@ pub enum CJDicError {
|
||||
#[error("Zip error: {0}")]
|
||||
ZipError(String),
|
||||
|
||||
#[error("Vibrato error: {0}")]
|
||||
VibratoError(String),
|
||||
|
||||
#[error("Not found")]
|
||||
NotFound,
|
||||
|
||||
@@ -64,3 +68,10 @@ impl From<ZipError> for CJDicError {
|
||||
CJDicError::ZipError(e.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<VibratoError> for CJDicError {
|
||||
fn from(e: VibratoError) -> Self {
|
||||
log::error!("{e:#}");
|
||||
CJDicError::VibratoError(e.to_string())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user