word segmentation and clipboard first word detector

This commit is contained in:
polv committed 2026-03-06 02:25:49 +07:00
1 parent 29a4d14893
commit 1614db6e99
19 files changed
+502 -13

No files matched your search

+11
View File
@@ -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())
}
}