Impl IntoOptPropValue for Option<V> -> Option<T>
* Impl IntoOptPropValue for Option<V> -> Option<T>
The only implmented types passed to impl_into_prop macro
* Update packages/yew/src/html/conversion.rs
sure
@@ -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(IntoPropValue::into_prop_value)
+ }
+ }
};
}
