mirror of https://github.com/linebender/xilem
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:
parent
4a94174f1a
commit
810d254122
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue