diff options
| author | Fuwn <[email protected]> | 2026-04-14 09:15:50 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-04-14 09:15:50 +0000 |
| commit | 43092b1cdfd6e1321fb5cf4ca7d50fa5c25d04f1 (patch) | |
| tree | c56dfcab5b666b602b32aed0f5f651e84ee64ea6 /src/handler | |
| parent | perf(context)!: Replace HashMap parameters with Parameters newtype backed by Vec (diff) | |
| download | archived-windmark-43092b1cdfd6e1321fb5cf4ca7d50fa5c25d04f1.tar.xz archived-windmark-43092b1cdfd6e1321fb5cf4ca7d50fa5c25d04f1.zip | |
perf(router)!: Pass RouteContext by reference to Partial headers and footers
Diffstat (limited to 'src/handler')
| -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 b8f4057..a52fa59 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(&mut self, context: &RouteContext) -> String; } impl<T> Partial for T -where T: FnMut(RouteContext) -> String + Send + Sync +where T: FnMut(&RouteContext) -> String + Send + Sync { - fn call(&mut self, context: RouteContext) -> String { (*self)(context) } + fn call(&mut self, context: &RouteContext) -> String { (*self)(context) } } |