You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Remove unnecessary boxing of warp filters
This was needed because of a compiler regression. Now that we're using Rust 1.58 there is no benefit to boxing them
This commit is contained in:
@@ -55,14 +55,7 @@ pub fn root(
|
||||
);
|
||||
let static_files = static_files(config.http.web_root.clone());
|
||||
|
||||
let filter = health
|
||||
.or(views)
|
||||
.unify()
|
||||
.or(static_files)
|
||||
.unify()
|
||||
.boxed()
|
||||
.or(oauth2)
|
||||
.boxed();
|
||||
let filter = health.or(views).unify().or(static_files).unify().or(oauth2);
|
||||
|
||||
filter.with(warp::log(module_path!())).boxed()
|
||||
}
|
||||
|
||||
@@ -53,18 +53,13 @@ pub fn filter(
|
||||
let filter = discovery
|
||||
.or(keys)
|
||||
.unify()
|
||||
.boxed()
|
||||
.or(userinfo)
|
||||
.unify()
|
||||
.boxed()
|
||||
.or(token)
|
||||
.unify()
|
||||
.boxed()
|
||||
.or(introspection)
|
||||
.unify()
|
||||
.boxed()
|
||||
.with(cors().allow_methods([Method::POST, Method::GET]))
|
||||
.boxed();
|
||||
.with(cors().allow_methods([Method::POST, Method::GET]));
|
||||
|
||||
filter.or(authorization).boxed()
|
||||
}
|
||||
|
||||
@@ -47,8 +47,16 @@ pub(super) fn filter(
|
||||
let logout = logout(pool, cookies_config);
|
||||
let reauth = reauth(pool, templates, csrf_config, cookies_config);
|
||||
|
||||
let f1 = index.or(account).unify().boxed();
|
||||
let f2 = login.or(register).unify().boxed();
|
||||
let f3 = logout.or(reauth).unify().boxed();
|
||||
f1.or(f2).unify().or(f3).unify().boxed()
|
||||
index
|
||||
.or(account)
|
||||
.unify()
|
||||
.or(login)
|
||||
.unify()
|
||||
.or(register)
|
||||
.unify()
|
||||
.or(logout)
|
||||
.unify()
|
||||
.or(reauth)
|
||||
.unify()
|
||||
.boxed()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user