From e1592425b98d623437dca756e6f680144ed65070 Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 20 Nov 2024 08:56:22 +0200 Subject: [PATCH] add key info to error enum --- src/profile/identity/gemini/auth/memory.rs | 2 +- src/profile/identity/gemini/auth/memory/error.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/profile/identity/gemini/auth/memory.rs b/src/profile/identity/gemini/auth/memory.rs index e01611b1..3a080ba8 100644 --- a/src/profile/identity/gemini/auth/memory.rs +++ b/src/profile/identity/gemini/auth/memory.rs @@ -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(()), } } diff --git a/src/profile/identity/gemini/auth/memory/error.rs b/src/profile/identity/gemini/auth/memory/error.rs index 4d8262af..0952f998 100644 --- a/src/profile/identity/gemini/auth/memory/error.rs +++ b/src/profile/identity/gemini/auth/memory/error.rs @@ -1,4 +1,4 @@ #[derive(Debug)] pub enum Error { - Overwrite, + Overwrite(i64), }