diff options
| author | Fuwn <[email protected]> | 2023-04-06 01:53:22 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-04-06 01:53:22 -0700 |
| commit | 9235be2eedc2c4f3a78cb704b0a107f33607e530 (patch) | |
| tree | fc927ec6d5a58d2e995cf6ff80ae2804a2265531 /src/route.rs | |
| parent | deps(windmark): bump 0.2.5 -> 0.3.1 (diff) | |
| download | locus-9235be2eedc2c4f3a78cb704b0a107f33607e530.tar.xz locus-9235be2eedc2c4f3a78cb704b0a107f33607e530.zip | |
feat: native async reqwest calls
Diffstat (limited to 'src/route.rs')
| -rw-r--r-- | src/route.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/route.rs b/src/route.rs index 3590f59..4cc884f 100644 --- a/src/route.rs +++ b/src/route.rs @@ -60,7 +60,7 @@ pub fn track_mount<F, R>( description: &str, handler: F, ) where - F: FnMut(RouteContext<'_>) -> R + Send + Sync + 'static, + F: FnMut(RouteContext) -> R + Send + Sync + 'static, R: IntoFuture<Output = windmark::Response> + Send + 'static, <R as IntoFuture>::IntoFuture: Send, { @@ -68,7 +68,7 @@ pub fn track_mount<F, R>( router.mount(route, handler); } -pub fn cache(context: &RouteContext<'_>, response: &str) { +pub fn cache(context: &RouteContext, response: &str) { static LAST_CACHED: Lazy<Mutex<Instant>> = Lazy::new(|| Mutex::new(Instant::now())); |