@@ -1013,20 +1013,18 @@ fn test_windows(target: &str) {
1013
1013
1014
1014
cfg. fn_cname ( move |name, cname| cname. unwrap_or ( name) . to_string ( ) ) ;
1015
1015
1016
- cfg. skip_type ( move |name| {
1017
- match name {
1018
- "SSIZE_T" if !gnu => true ,
1019
- "ssize_t" if !gnu => true ,
1020
- _ => false ,
1021
- }
1016
+ cfg. skip_type ( move |name| match name {
1017
+ "SSIZE_T" if !gnu => true ,
1018
+ "ssize_t" if !gnu => true ,
1019
+ _ => false ,
1022
1020
} ) ;
1023
1021
1024
1022
cfg. skip_const ( move |name| {
1025
1023
match name {
1026
1024
// FIXME: API error:
1027
1025
// SIG_ERR type is "void (*)(int)", not "int"
1028
1026
"SIG_ERR" => true ,
1029
- _ => false ,
1027
+ _ => false ,
1030
1028
}
1031
1029
} ) ;
1032
1030
@@ -1047,10 +1045,7 @@ fn test_windows(target: &str) {
1047
1045
cfg. skip_fn ( move |name| {
1048
1046
match name {
1049
1047
// FIXME: API error:
1050
- "execv" |
1051
- "execve" |
1052
- "execvp" |
1053
- "execvpe" => true ,
1048
+ "execv" | "execve" | "execvp" | "execvpe" => true ,
1054
1049
1055
1050
_ => false ,
1056
1051
}
@@ -1065,7 +1060,7 @@ fn test_redox(target: &str) {
1065
1060
let mut cfg = ctest:: TestGenerator :: new ( ) ;
1066
1061
cfg. flag ( "-Wno-deprecated-declarations" ) ;
1067
1062
1068
- headers ! {
1063
+ headers ! {
1069
1064
cfg:
1070
1065
"ctype.h" ,
1071
1066
"dirent.h" ,
@@ -1131,7 +1126,7 @@ fn test_cloudabi(target: &str) {
1131
1126
let mut cfg = ctest:: TestGenerator :: new ( ) ;
1132
1127
cfg. flag ( "-Wno-deprecated-declarations" ) ;
1133
1128
1134
- headers ! {
1129
+ headers ! {
1135
1130
cfg:
1136
1131
"execinfo.h" ,
1137
1132
"glob.h" ,
@@ -1206,7 +1201,7 @@ fn test_solaris(target: &str) {
1206
1201
cfg. define ( "__EXTENSIONS__" , None ) ;
1207
1202
cfg. define ( "_LCONV_C99" , None ) ;
1208
1203
1209
- headers ! {
1204
+ headers ! {
1210
1205
cfg:
1211
1206
"ctype.h" ,
1212
1207
"dirent.h" ,
@@ -1269,14 +1264,13 @@ fn test_solaris(target: &str) {
1269
1264
"wchar.h" ,
1270
1265
}
1271
1266
1272
- cfg. skip_const ( move |name| {
1273
- match name {
1274
- "DT_FIFO" | "DT_CHR" | "DT_DIR" | "DT_BLK" | "DT_REG" | "DT_LNK" |
1275
- "DT_SOCK" |"USRQUOTA" | "GRPQUOTA" | "PRIO_MIN" | "PRIO_MAX"
1276
- => true ,
1277
-
1278
- _ => false ,
1267
+ cfg. skip_const ( move |name| match name {
1268
+ "DT_FIFO" | "DT_CHR" | "DT_DIR" | "DT_BLK" | "DT_REG" | "DT_LNK"
1269
+ | "DT_SOCK" | "USRQUOTA" | "GRPQUOTA" | "PRIO_MIN" | "PRIO_MAX" => {
1270
+ true
1279
1271
}
1272
+
1273
+ _ => false ,
1280
1274
} ) ;
1281
1275
1282
1276
cfg. skip_fn ( move |name| {
@@ -1412,7 +1406,7 @@ fn test_netbsd(target: &str) {
1412
1406
// Our stat *_nsec fields normally don't actually exist but are part
1413
1407
// of a timeval struct
1414
1408
s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
1415
- s. replace ( "e_nsec" , ".tv_nsec" )
1409
+ s. replace ( "e_nsec" , ".tv_nsec" )
1416
1410
}
1417
1411
"u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
1418
1412
s => s. to_string ( ) ,
@@ -1444,7 +1438,7 @@ fn test_netbsd(target: &str) {
1444
1438
// uuid_t is a struct, not an integer.
1445
1439
n if n. starts_with ( "pthread" ) => true ,
1446
1440
// sem_t is a struct or pointer
1447
- "sem_t" => true ,
1441
+ "sem_t" => true ,
1448
1442
_ => false ,
1449
1443
}
1450
1444
} ) ;
@@ -1614,14 +1608,17 @@ fn test_dragonflybsd(target: &str) {
1614
1608
// Our stat *_nsec fields normally don't actually exist but are part
1615
1609
// of a timeval struct
1616
1610
s if s. ends_with ( "_nsec" ) && struct_. starts_with ( "stat" ) => {
1617
- s. replace ( "e_nsec" , ".tv_nsec" )
1611
+ s. replace ( "e_nsec" , ".tv_nsec" )
1618
1612
}
1619
1613
"u64" if struct_ == "epoll_event" => "data.u64" . to_string ( ) ,
1620
- "type_" if struct_ == "input_event"
1621
- || struct_ == "input_mask"
1622
- || struct_ == "ff_effect"
1623
- || struct_ == "rtprio" =>
1624
- "type" . to_string ( ) ,
1614
+ "type_"
1615
+ if struct_ == "input_event"
1616
+ || struct_ == "input_mask"
1617
+ || struct_ == "ff_effect"
1618
+ || struct_ == "rtprio" =>
1619
+ {
1620
+ "type" . to_string ( )
1621
+ }
1625
1622
s => s. to_string ( ) ,
1626
1623
}
1627
1624
} ) ;
0 commit comments