Skip to content

Commit

Permalink
Remove unnecessary sync constraint from async_predicate (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
PoOnesNerfect authored Jun 22, 2024
1 parent a1e3f8a commit 3edac9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tower-http/src/cors/allow_origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl AllowOrigin {
pub fn async_predicate<F, Fut>(f: F) -> Self
where
F: FnOnce(HeaderValue, &RequestParts) -> Fut + Send + Sync + 'static + Clone,
Fut: Future<Output = bool> + Send + Sync + 'static,
Fut: Future<Output = bool> + Send + 'static,
{
Self(OriginInner::AsyncPredicate(Arc::new(move |v, p| {
Box::pin((f.clone())(v, p))
Expand Down

0 comments on commit 3edac9b

Please sign in to comment.