From fff207d3cb41c5a76db234196f16d28952dfd91c Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 6 Apr 2023 08:01:52 +0000 Subject: feat(response): async error handler --- src/handler/response/route.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/handler/response/route.rs') diff --git a/src/handler/response/route.rs b/src/handler/response/route.rs index 0196363..a65b889 100644 --- a/src/handler/response/route.rs +++ b/src/handler/response/route.rs @@ -16,8 +16,6 @@ // Copyright (C) 2022-2022 Fuwn // SPDX-License-Identifier: GPL-3.0-only -use std::future::Future; - use async_trait::async_trait; use crate::{context::RouteContext, Response}; @@ -32,7 +30,7 @@ pub trait RouteResponse: Send + Sync { impl RouteResponse for T where T: FnMut(RouteContext<'_>) -> F + Send + Sync, - F: Future + Send + 'static, + F: std::future::Future + Send + 'static, { async fn call(&mut self, context: RouteContext<'_>) -> Response { (*self)(context).await -- cgit v1.2.3