From 8030bba615ba1aaad6c31fbbe7a5d1bc31dc098e Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 14 Apr 2026 09:23:12 +0000 Subject: perf(router)!: Replace per-request locks with lock-free frozen storage --- src/handler/partial.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/handler/partial.rs') 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 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) } } -- cgit v1.2.3