From e21ce0d52427715179b6309f9e7a7e06145d8b8e Mon Sep 17 00:00:00 2001 From: Awiteb Date: Mon, 12 Aug 2024 12:23:57 +0000 Subject: [PATCH] refactor!: Refactor `CaptchaStorage` trait - Remove the requirement for the `Clone` trait in the `Self` - Remove the `Display` and `Debug` trait and require `Error` trait instead in `CaptchaStorage::Error` Signed-off-by: Awiteb --- src/storage/mod.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/storage/mod.rs b/src/storage/mod.rs index afa6af1..4f9f917 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -22,12 +22,9 @@ pub use cacache_storage::*; /// The trait will be implemented for `Arc` if `T` implements the trait. /// /// The trait is thread safe, so the storage can be shared between threads. -pub trait CaptchaStorage: Send + Sync + 'static -where - Self: Clone + std::fmt::Debug, -{ +pub trait CaptchaStorage: Send + Sync + 'static { /// The error type of the storage. - type Error: std::fmt::Display + std::fmt::Debug + Send; + type Error: std::error::Error + Send; /// Store the captcha token and answer. fn store_answer(