trait bound
This commit is contained in:
parent
d4639c3152
commit
3c5bff0237
1 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@ use std::sync::Arc;
|
|||
use tokio::sync::Mutex;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::db::SqliteDatabase;
|
||||
use crate::db::{Database, SqliteDatabase};
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Password(pub SecretString);
|
||||
|
||||
|
@ -13,11 +13,11 @@ pub struct Password(pub SecretString);
|
|||
pub struct UserToken(pub SecretString);
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Authenticator {
|
||||
db: Arc<Mutex<SqliteDatabase>>,
|
||||
pub struct Authenticator<DB: Database> {
|
||||
db: Arc<Mutex<DB>>,
|
||||
}
|
||||
|
||||
impl Authenticator {
|
||||
impl Authenticator<SqliteDatabase> {
|
||||
pub fn new(db: Arc<Mutex<SqliteDatabase>>) -> Self {
|
||||
Self { db }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue