File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1983,15 +1983,15 @@ fn get_compatible_record_fields(constructors: &[TypeValueConstructor]) -> Vec<Re
1983
1983
// If there is only one constructor, we simply show the documentation
1984
1984
// for the field.
1985
1985
first_parameter. documentation . clone ( )
1986
- } else if let Some ( field_documentation ) = & first_parameter . documentation {
1986
+ } else {
1987
1987
// If there are multiple constructors, we show the documentation of
1988
1988
// this field for each of the variants.
1989
- Some ( eco_format ! ( "## {} \n \n {}" , first . name , field_documentation ) )
1990
- } else {
1991
- // If there is no documentation on the field of the first constructor,
1992
- // we leave it as `None` until we find a field which does have
1993
- // documentation.
1994
- None
1989
+ first_parameter
1990
+ . documentation
1991
+ . as_ref ( )
1992
+ . map ( |field_documentation| {
1993
+ eco_format ! ( "## {} \n \n {}" , first . name , field_documentation )
1994
+ } )
1995
1995
} ;
1996
1996
1997
1997
// Check each variant to see if they have an field in the same position
You can’t perform that action at this time.
0 commit comments