fix custom_display_fn

This commit is contained in:
Aiden McClelland
2024-05-03 22:43:48 -06:00
parent 6bb66a4400
commit cbbeea0495
2 changed files with 5 additions and 7 deletions

View File

@@ -30,9 +30,9 @@ pub trait HandlerExt<Context: crate::Context>: HandlerFor<Context> + Sized {
fn with_custom_display_fn<C: crate::Context, F>(
self,
display: F,
) -> CustomDisplayFn<F, Self, Context>
) -> CustomDisplayFn<F, Self, C>
where
F: Fn(HandlerArgsFor<Context, Self>, Self::Ok) -> Result<(), Self::Err>;
F: Fn(HandlerArgsFor<C, Self>, Self::Ok) -> Result<(), Self::Err>;
fn with_inherited<Params, InheritedParams, F>(
self,
f: F,
@@ -64,12 +64,9 @@ impl<Context: crate::Context, T: HandlerFor<Context> + Sized> HandlerExt<Context
handler: self,
}
}
fn with_custom_display_fn<C: crate::Context, F>(
self,
display: F,
) -> CustomDisplayFn<F, Self, Context>
fn with_custom_display_fn<C: crate::Context, F>(self, display: F) -> CustomDisplayFn<F, Self, C>
where
F: Fn(HandlerArgsFor<Context, Self>, Self::Ok) -> Result<(), Self::Err>,
F: Fn(HandlerArgsFor<C, Self>, Self::Ok) -> Result<(), Self::Err>,
{
CustomDisplayFn {
_phantom: PhantomData::new(),