add key info to error enum

This commit is contained in:
yggverse 2024-11-20 08:56:22 +02:00
parent ebe8d849d6
commit e1592425b9
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ impl Memory {
.borrow_mut()
.insert(url, profile_identity_gemini_id)
{
Some(_) => Err(Error::Overwrite), // @TODO prevent?
Some(key) => Err(Error::Overwrite(key)), // @TODO prevent?
None => Ok(()),
}
}

View File

@ -1,4 +1,4 @@
#[derive(Debug)]
pub enum Error {
Overwrite,
Overwrite(i64),
}