now unwrapping type when documenting a field which has `#[prop(strip_option)]`

This commit is contained in:
Jose Quesada 2022-12-27 12:20:14 -06:00
parent 8b81425b21
commit b3c4c77dee
1 changed files with 4 additions and 1 deletions

View File

@ -607,7 +607,10 @@ fn prop_to_doc(
}: &Prop,
style: PropDocStyle,
) -> TokenStream {
let ty = if prop_opts.contains(&PropOpt::Optional) && is_option(ty) {
let ty = if (prop_opts.contains(&PropOpt::Optional)
|| prop_opts.contains(&PropOpt::StripOption))
&& is_option(ty)
{
unwrap_option(ty).unwrap()
} else {
ty.to_owned()