mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
implement to_string method, prevent memory index overwrite on validation step
This commit is contained in:
parent
cda94cba2e
commit
c86dca53bd
10 changed files with 100 additions and 21 deletions
|
|
@ -3,3 +3,16 @@ pub enum Error {
|
|||
Database(sqlite::Error),
|
||||
Gemini(super::gemini::Error),
|
||||
}
|
||||
|
||||
impl Error {
|
||||
pub fn to_string(&self) -> String {
|
||||
match self {
|
||||
Self::Database(reason) => {
|
||||
format!("Database error: {}", reason.to_string())
|
||||
}
|
||||
Self::Gemini(reason) => {
|
||||
format!("Could not init Gemini identity: {}", reason.to_string())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue