1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-09 10:01:45 +03:00

storage: make the Clock a trait

This commit is contained in:
Quentin Gliech
2023-01-18 12:20:30 +01:00
parent 73a921cc30
commit 142fdbd45a
62 changed files with 261 additions and 212 deletions

View File

@ -21,7 +21,7 @@ use mas_storage::{
oauth2::OAuth2ClientRepository,
upstream_oauth2::UpstreamOAuthProviderRepository,
user::{UserEmailRepository, UserPasswordRepository, UserRepository},
Clock, Repository,
Repository, SystemClock,
};
use mas_storage_pg::PgRepository;
use oauth2_types::scope::Scope;
@ -188,7 +188,7 @@ impl Options {
#[allow(clippy::too_many_lines)]
pub async fn run(&self, root: &super::Options) -> anyhow::Result<()> {
use Subcommand as SC;
let clock = Clock::default();
let clock = SystemClock::default();
// XXX: we should disallow SeedableRng::from_entropy
let mut rng = rand_chacha::ChaChaRng::from_entropy();