Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/yew/src/html/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ macro_rules! impl_into_prop {
Some({ $conversion })
}
}
// implement Option<V> -> Option<T>
impl IntoOptPropValue<$to_ty> for Option<$from_ty> {
fn into_opt_prop_value(self) -> Option<$to_ty> {
self.map(|$value| $value.into_prop_value())
}
}
};
}

Expand Down