@@ -742,15 +742,13 @@ fn test_solarish(target: &str) {
742742 }
743743 } ) ;
744744
745- cfg. type_name ( move |ty, is_struct, is_union| {
746- match ty {
747- "FILE" => "__FILE" . to_string ( ) ,
748- "DIR" | "Dl_info" => ty. to_string ( ) ,
749- t if t. ends_with ( "_t" ) => t. to_string ( ) ,
750- t if is_struct => format ! ( "struct {}" , t) ,
751- t if is_union => format ! ( "union {}" , t) ,
752- t => t. to_string ( ) ,
753- }
745+ cfg. type_name ( move |ty, is_struct, is_union| match ty {
746+ "FILE" => "__FILE" . to_string ( ) ,
747+ "DIR" | "Dl_info" => ty. to_string ( ) ,
748+ t if t. ends_with ( "_t" ) => t. to_string ( ) ,
749+ t if is_struct => format ! ( "struct {}" , t) ,
750+ t if is_union => format ! ( "union {}" , t) ,
751+ t => t. to_string ( ) ,
754752 } ) ;
755753
756754 cfg. field_name ( move |struct_, field| {
@@ -762,8 +760,8 @@ fn test_solarish(target: &str) {
762760 "stat" if field. ends_with ( "_nsec" ) => {
763761 // expose stat.Xtim.tv_nsec fields
764762 field. trim_end_matches ( "e_nsec" ) . to_string ( ) + ".tv_nsec"
765- } ,
766- _ => field. to_string ( )
763+ }
764+ _ => field. to_string ( ) ,
767765 }
768766 } ) ;
769767
@@ -778,8 +776,8 @@ fn test_solarish(target: &str) {
778776
779777 "DT_UNKNOWN" => true ,
780778
781- "_UTX_LINESIZE" | "_UTX_USERSIZE" |
782- "_UTX_PADSIZE" | "_UTX_IDSIZE" | "_UTX_HOSTSIZE" => true ,
779+ "_UTX_LINESIZE" | "_UTX_USERSIZE" | "_UTX_PADSIZE" | "_UTX_IDSIZE"
780+ | "_UTX_HOSTSIZE" => true ,
783781
784782 "EADI" | "EXTPROC" | "IPC_SEAT" => true ,
785783
@@ -789,12 +787,10 @@ fn test_solarish(target: &str) {
789787 _ => false ,
790788 } ) ;
791789
792-
793-
794790 cfg. skip_struct ( move |ty| {
795791 // the union handling is a mess
796792 if ty. contains ( "door_desc_t_" ) {
797- return true
793+ return true ;
798794 }
799795 match ty {
800796 // union, not a struct
@@ -824,7 +820,7 @@ fn test_solarish(target: &str) {
824820 "door_arg_t" if field. ends_with ( "_ptr" ) => true ,
825821 "door_arg_t" if field. ends_with ( "rbuf" ) => true ,
826822
827- _ => false
823+ _ => false ,
828824 }
829825 } ) ;
830826
@@ -849,10 +845,12 @@ fn test_solarish(target: &str) {
849845 "cfmakeraw" | "cfsetspeed" => true ,
850846
851847 // const-ness issues
852- "execv" | "execve" | "execvp" | "settimeofday" | "sethostname" => true ,
848+ "execv" | "execve" | "execvp" | "settimeofday" | "sethostname" => {
849+ true
850+ }
853851
854852 // Solaris-different
855- "getpwent_r" | "getgrent_r" | "updwtmpx" if is_illumos => true ,
853+ "getpwent_r" | "getgrent_r" | "updwtmpx" if is_illumos => true ,
856854 "madvise" | "mprotect" if is_illumos => true ,
857855 "door_call" | "door_return" | "door_create" if is_illumos => true ,
858856
0 commit comments