Add default for generic parameter F of Adapt

This allows spelling out the Adapt type easily if F is a regular
function or closure that does not capture.
This commit is contained in:
Jonas Platte 2023-07-16 16:49:19 +02:00
parent 4a94174f1a
commit 810d254122
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ macro_rules! generate_adapt_view {
ChildT,
ChildA,
V: $viewtrait<ChildT, ChildA>,
F: Fn(&mut ParentT, AdaptThunk<ChildT, ChildA, V>) -> $crate::MessageResult<ParentA>,
F: Fn(&mut ParentT, AdaptThunk<ChildT, ChildA, V>) -> $crate::MessageResult<ParentA> =
fn(&mut ParentT, AdaptThunk<ChildT, ChildA, V>) -> $crate::MessageResult<ParentA>,
> {
f: F,
child: V,