@@ -742,15 +742,13 @@ fn test_solarish(target: &str) {
742
742
}
743
743
} ) ;
744
744
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 ( ) ,
754
752
} ) ;
755
753
756
754
cfg. field_name ( move |struct_, field| {
@@ -762,8 +760,8 @@ fn test_solarish(target: &str) {
762
760
"stat" if field. ends_with ( "_nsec" ) => {
763
761
// expose stat.Xtim.tv_nsec fields
764
762
field. trim_end_matches ( "e_nsec" ) . to_string ( ) + ".tv_nsec"
765
- } ,
766
- _ => field. to_string ( )
763
+ }
764
+ _ => field. to_string ( ) ,
767
765
}
768
766
} ) ;
769
767
@@ -778,8 +776,8 @@ fn test_solarish(target: &str) {
778
776
779
777
"DT_UNKNOWN" => true ,
780
778
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 ,
783
781
784
782
"EADI" | "EXTPROC" | "IPC_SEAT" => true ,
785
783
@@ -789,12 +787,10 @@ fn test_solarish(target: &str) {
789
787
_ => false ,
790
788
} ) ;
791
789
792
-
793
-
794
790
cfg. skip_struct ( move |ty| {
795
791
// the union handling is a mess
796
792
if ty. contains ( "door_desc_t_" ) {
797
- return true
793
+ return true ;
798
794
}
799
795
match ty {
800
796
// union, not a struct
@@ -824,7 +820,7 @@ fn test_solarish(target: &str) {
824
820
"door_arg_t" if field. ends_with ( "_ptr" ) => true ,
825
821
"door_arg_t" if field. ends_with ( "rbuf" ) => true ,
826
822
827
- _ => false
823
+ _ => false ,
828
824
}
829
825
} ) ;
830
826
@@ -849,10 +845,12 @@ fn test_solarish(target: &str) {
849
845
"cfmakeraw" | "cfsetspeed" => true ,
850
846
851
847
// const-ness issues
852
- "execv" | "execve" | "execvp" | "settimeofday" | "sethostname" => true ,
848
+ "execv" | "execve" | "execvp" | "settimeofday" | "sethostname" => {
849
+ true
850
+ }
853
851
854
852
// Solaris-different
855
- "getpwent_r" | "getgrent_r" | "updwtmpx" if is_illumos => true ,
853
+ "getpwent_r" | "getgrent_r" | "updwtmpx" if is_illumos => true ,
856
854
"madvise" | "mprotect" if is_illumos => true ,
857
855
"door_call" | "door_return" | "door_create" if is_illumos => true ,
858
856
0 commit comments