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 <a@4rs.nl>
This commit is contained in:
parent
25f90ecfaf
commit
e21ce0d524
1 changed files with 2 additions and 5 deletions
|
@ -22,12 +22,9 @@ pub use cacache_storage::*;
|
|||
/// The trait will be implemented for `Arc<T>` 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(
|
||||
|
|
Loading…
Reference in a new issue