diff options
| author | Fuwn <[email protected]> | 2026-04-14 09:23:12 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-04-14 09:23:12 +0000 |
| commit | 8030bba615ba1aaad6c31fbbe7a5d1bc31dc098e (patch) | |
| tree | fc847483711476c407811ede02fea83641fcfedc /src/handler/partial.rs | |
| parent | perf(router)!: Pass RouteContext by reference to Partial headers and footers (diff) | |
| download | archived-windmark-8030bba615ba1aaad6c31fbbe7a5d1bc31dc098e.tar.xz archived-windmark-8030bba615ba1aaad6c31fbbe7a5d1bc31dc098e.zip | |
perf(router)!: Replace per-request locks with lock-free frozen storage
Diffstat (limited to 'src/handler/partial.rs')
| -rw-r--r-- | src/handler/partial.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/handler/partial.rs b/src/handler/partial.rs index a52fa59..a552096 100644 --- a/src/handler/partial.rs +++ b/src/handler/partial.rs @@ -2,11 +2,11 @@ use crate::context::RouteContext; #[allow(clippy::module_name_repetitions)] pub trait Partial: Send + Sync { - fn call(&mut self, context: &RouteContext) -> String; + fn call(&self, context: &RouteContext) -> String; } impl<T> Partial for T -where T: FnMut(&RouteContext) -> String + Send + Sync +where T: Fn(&RouteContext) -> String + Send + Sync { - fn call(&mut self, context: &RouteContext) -> String { (*self)(context) } + fn call(&self, context: &RouteContext) -> String { (*self)(context) } } |