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

storage: freeze the error type on BoxRepository

This avoids having to deal with traits bounds everywhere. It also moves
the `boxed()` method to the PgRepository, because it was unnecessary to
keep it on the `Repository` trait
This commit is contained in:
Quentin Gliech
2024-07-24 15:26:01 +02:00
parent 48c4c34e88
commit 144de0deb2
12 changed files with 41 additions and 48 deletions

View File

@@ -30,7 +30,7 @@ use mas_matrix::BoxHomeserverConnection;
use mas_matrix_synapse::SynapseConnection;
use mas_policy::{Policy, PolicyFactory};
use mas_router::UrlBuilder;
use mas_storage::{BoxClock, BoxRepository, BoxRng, Repository, SystemClock};
use mas_storage::{BoxClock, BoxRepository, BoxRng, SystemClock};
use mas_storage_pg::PgRepository;
use mas_templates::Templates;
use opentelemetry::{
@@ -351,8 +351,6 @@ impl FromRequestParts<AppState> for BoxRepository {
histogram.record(duration_ms, &[]);
}
Ok(repo
.map_err(mas_storage::RepositoryError::from_error)
.boxed())
Ok(repo.boxed())
}
}