You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
More cleanups
This commit is contained in:
@ -21,7 +21,7 @@ hyper = { version = "0.14.22", features = ["full"] }
|
||||
tower = "0.4.13"
|
||||
tower-http = { version = "0.3.4", features = ["cors"] }
|
||||
axum = "0.6.0-rc.2"
|
||||
axum-macros = "0.2.3"
|
||||
axum-macros = "0.3.0-rc.1"
|
||||
axum-extra = { version = "0.4.0-rc.1", features = ["cookie-private"] }
|
||||
|
||||
# Emails
|
||||
|
@ -13,7 +13,12 @@
|
||||
// limitations under the License.
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
#![deny(clippy::all, clippy::str_to_string, rustdoc::broken_intra_doc_links)]
|
||||
#![deny(
|
||||
clippy::all,
|
||||
clippy::str_to_string,
|
||||
rustdoc::broken_intra_doc_links,
|
||||
clippy::future_not_send
|
||||
)]
|
||||
#![warn(clippy::pedantic)]
|
||||
#![allow(
|
||||
clippy::unused_async // Some axum handlers need that
|
||||
|
@ -108,7 +108,7 @@ impl CallbackDestination {
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn go<T: Serialize>(
|
||||
pub async fn go<T: Serialize + Send + Sync>(
|
||||
self,
|
||||
templates: &Templates,
|
||||
params: T,
|
||||
|
@ -153,7 +153,7 @@ const INACTIVE: IntrospectionResponse = IntrospectionResponse {
|
||||
jti: None,
|
||||
};
|
||||
|
||||
#[tracing::instrument(skip_all, err)]
|
||||
#[allow(clippy::too_many_lines)]
|
||||
pub(crate) async fn post(
|
||||
State(pool): State<PgPool>,
|
||||
State(encrypter): State<Encrypter>,
|
||||
|
@ -57,7 +57,7 @@ pub async fn get(
|
||||
let (_clock, mut rng) = crate::rng_and_clock()?;
|
||||
let mut conn = pool.acquire().await?;
|
||||
|
||||
let session = user_authorization.protected(&mut conn).await?;
|
||||
let session = user_authorization.protected(&mut *conn).await?;
|
||||
|
||||
let user = session.browser_session.user;
|
||||
let mut user_info = UserInfo {
|
||||
|
@ -74,7 +74,7 @@ pub(crate) async fn get(
|
||||
}
|
||||
|
||||
async fn render(
|
||||
rng: impl Rng,
|
||||
rng: impl Rng + Send,
|
||||
clock: &Clock,
|
||||
templates: Templates,
|
||||
session: BrowserSession<PostgresqlBackend>,
|
||||
|
@ -62,7 +62,7 @@ pub(crate) async fn get(
|
||||
}
|
||||
|
||||
async fn render(
|
||||
rng: impl Rng,
|
||||
rng: impl Rng + Send,
|
||||
clock: &Clock,
|
||||
templates: Templates,
|
||||
session: BrowserSession<PostgresqlBackend>,
|
||||
|
Reference in New Issue
Block a user